Alternative network messaging?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Alternative network messaging?
# 8  
Old 10-23-2012
Well, scripts and commands they can call, apparently.

One paradigm that might work for you is to have users drop comments as files in a dir, and have a daemon gor around polling all the comments and moving them to a common message file that is then extended on every host, where viewers are watching it with tail -f. More ssh/rsh than whatever.

A messaging milieu needs authentication, a directory service of discussions one can join, a means of viewing the discussion and a means of appending commetns to the discussion. You might extend it to having admins and chairpersons for better control. If discussions are long, each user should have a high water mark setting in every discussion so they can catch up. A facility for attachments like email is nice, too. Then there are things like abuse reporting, blocking, encrytption of records. It pays to envision with a very open mind.
This User Gave Thanks to DGPickett For This Post:
# 9  
Old 10-23-2012
This script can be much easier: Just a message should appear on the receiver's terminal. Depending on the user privileges, the message can be sent to only one or to all users. A simple chat is possible with netcat, but it has to be instantiated from both sides. Maybe it could be better done with rcp, but here some kind of event listener would be necessary.

Last edited by 123_abc; 10-24-2012 at 06:06 AM..
# 10  
Old 10-24-2012
Writing to the tty of another user usually has permission problems. If you have one window for the discussion, which is "tail -f mtg_file" and one for comments 'while read l ;do echo `id -un`": $l" >>mtg_file ;done' then all you have to worry about is file permissions and ssh if remote. You might what to use an xterm with a big scroll buffer and not set to return to the bottom on every output. Or you chould share a google drive doc.
This User Gave Thanks to DGPickett For This Post:
# 11  
Old 10-24-2012
Maybe my approach isn't optimal, but my shell scripting knowledge is only a couple of days old. I thought it could work like this:

Dispatcher:
Writes text into a file. The file is sent to the receiver by rcp command.

Receiver:
A process is running in the background that is waiting for incoming messages. When a message is detected, it's written on the console. The messages are stored in /tmp/var or /tmp.
# 12  
Old 10-24-2012
Oddly enough, that approach sounds a lot like how an email originated. It could work. Polling is never efficient but if more sensible method are denied you nothing better pops to mind.
This User Gave Thanks to Corona688 For This Post:
# 13  
Old 10-24-2012
Do I have any better options in shell script than polling (while-sleep-construct)?
# 14  
Old 10-24-2012
Polling is an architectural choice. If the originators have a subscription list or a common destination, they can push. Polling is about pulling information that may not exist yet. Then there are signals, which shells can send with kill and receive with trap. Two signals are reserved for app use. Signals allow for interrupt driven processing, which is a sort of push, in that the originator pushes a signal. The master can process signals one at a time so no chaos erupts. However, the signal is pretty bare, does not tell you who is calling, so you need a per sender message file, even as just a flag, that is only polled on interrupt. That's nicer than polling in a tight loop wasting and destroying resources, or sleeping and ignoring new data. There is often a little poll under an interrupt. You could have the message files be queued in a special directory, named uniquely, so on interrupt the master processes each and then deletes it. The file name or content may just tell the master where to go for the full message, or may be the full message. Files can be composed elsewhere on that file system or in that dir but with a filtering extension, and mv'd when complete, so there is no race condition. Directories provide all the necessary locking and list management for multiple simultaneous writers. Exploit them.
This User Gave Thanks to DGPickett For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

The DT messaging system could not be started.

Good Morning, Users can no longer log into SunBlade 2500 Solaris 9 system (though root still can). Here's what I'm getting and what I've done. I'm most suspicious of the full drive since that pops up twice and I did see one looks full. What's a good way to reduce what's on it?- or.. what else... (2 Replies)
Discussion started by: Stellaman1977
2 Replies

2. UNIX for Advanced & Expert Users

The DT messaging system could not be started

Hello All, I am getting " The DT messaging system could not be started" message when wants to login as root on a box running on tru64 5.1A. /etc/hosts is ok. when i see in .dt/errorlog it shows message server could not be started. Thanks for help. Awadhesh (2 Replies)
Discussion started by: Awadhesh
2 Replies

3. Programming

problems while using messaging queues....

hi I am using posix functions such as mq_open, mq_close and including the mqueue.h. but its giving a linking error,"undefined reference to mq_open and mq_close". it it that we have to link some library or so while compiling... plzzz help Thanxs Mohit (0 Replies)
Discussion started by: mohit3884
0 Replies

4. UNIX and Linux Applications

how do i enable messaging

hi guyz i work as a system administrator for some organization(am a newbie). one of the solaris machines is loaded with the messenger server...all configured by a former administrator. my task was to create user accounts for the mail and calendar services and as i checked its not working .....i... (0 Replies)
Discussion started by: henokia4j
0 Replies

5. IP Networking

DT messaging could not be started

this id the message i get with a suggestions to check those files: /etc/src.sh /etc/hosts /usr/adm/inetd.sec i have little knowledge of hoe to edit those files/ i went to the etc library and didn't found src.sh file. what should i do? also didn't find the inetd.sec file In the host... (3 Replies)
Discussion started by: amirp
3 Replies

6. Programming

Instant Messaging App Help

I was hoping someone could assist me on a text-based instant messaging client(using UDP) I am working on. I have the network communication basics already in place but, specifically, needed some further help on the "messaging other users" and "getting a user list" functions. The server code that... (0 Replies)
Discussion started by: AusTex
0 Replies
Login or Register to Ask a Question