I would like to implement a push service, but I havent't found any example for that on the internet yet. The step from "kill" command to push service is too large for me.
A signal is a way to tell a program to do something when told instead of constantly checking for something. If it hasn't been told to do anything when it gets the signal, the signal will probably kill it instead.
Run this in one window:
Then do this in another:
...and the first script should receive the signal, trap it, read the file and delete it
Last edited by Corona688; 10-25-2012 at 01:09 PM..
Thanks for your example :-)
There is still a problem, because I can't call "kill" on a remote machine. Hence, I can only call a remote script that sends the signal to the remote process. Is It better to call the process by name or by process ID? Will the process ID be constant after reboot?
The signal processing is done out of sequence with the process thread(s), but in the same process so variables are passed.
So, you can push files to input-dir/unique.take-me-extension, the final step being mv and then kill to start the possibly, usually sleeping server so it processes the input.(
Of course, you have to be the same id or root to signal a process. Named pipes can stall servers that only require the writer have permission on the pipe.
Last edited by DGPickett; 10-25-2012 at 04:01 PM..
The whole app shall be some kind of LAN messaging program with a central host that receives, stores and forwards messages to the correct receiver when he is online. For sending messages over the LAN, rcp shall be used.
On the mediator host, each user has a folder where all the messages are stored that are addressed to him. Therefore, each sender must be able to send a signal to this mediator host when a message has been sent. I haven't yet completely understood how to call unambiguously a process on this host.
Last edited by 123_abc; 10-30-2012 at 02:35 PM..
Reason: additional thought
A common dir means there is only one place to look when woken up to process input. The file name itself can contain unique information like what user sent it and what the sequence number is. A "kill -SIGUSR1 `<pid_file`" can wake up the service.
If you make it a UDP service, the server blocks on the UDP socket waiting for incoming messages, processing them one at a time. They can be queued in the socket buffer, which can be made large enough to deal with the probalbe backlog. The process reading the socket can just log the messages for further processing, so there is no liklihood of a big backlog. The service can frame the bytes in the log into different discussions. Once the log gets to a certain size, it can be rotated out for another. The log could even be a zip file for the day, with each message an archived file in appropriate interanl folder paths. You can glob through zip files as if they were directories with some tools like MS Windows Compressed folders and HXTT JDBC CSV/Text Drivers. UDP also allows for a multicast of messages back to participating users. The size is a bit restricted, not as much as twitter, 65k, but 1,440 is a more reliable size.
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)
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)
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)
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)
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)
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)