|
Home > Archive > Unix Programming > December 2004 > Interprocess communication: which scenario?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Interprocess communication: which scenario?
|
|
| Charles Packer 2004-12-20, 5:50 pm |
| I need to do the following simple interprocess communication (IPC) among these
processes that are all on the same box:
-- A daemon waits for "I'm here" announcements from multiple clients
-- One or more clients send an "I'm here" to the daemon upon command
via the client's GUI (Each client's GUI is viewed by a different
human user)
The daemon retransmits "X is here" to all clients when it receives any "I'm here".
I read some tutorials on message queues and sockets and have tried their examples,
but that's the extent of my experience in this area. Since I'm going to have
to invest a significant amount of time learning molecular-level trivia about
IPC to implement the application in C, I'd like some opinions as to which IPC
scenario -- sockets, message queues, etc. is most appropriate for my application
model.
| |
|
| Charles Packer wrote:
> I need to do the following simple interprocess communication (IPC)
among these
> processes that are all on the same box:
Ok
> -- A daemon waits for "I'm here" announcements from multiple clients
Daemon may listen socket/pipe for these messages
> -- One or more clients send an "I'm here" to the daemon upon command
> via the client's GUI (Each client's GUI is viewed by a different
> human user)
These clients will send this message to server's socket/pipe
> The daemon retransmits "X is here" to all clients when it receives
any "I'm here".
The server can do it by using multicast notifications
>
> I read some tutorials on message queues and sockets and have tried
their examples,
> but that's the extent of my experience in this area. Since I'm going
to have
> to invest a significant amount of time learning molecular-level
trivia about
> IPC to implement the application in C, I'd like some opinions as to
which IPC
> scenario -- sockets, message queues, etc. is most appropriate for my
application
> model.
There is one of many opinios :-)
| |
| CBFalconer 2004-12-20, 5:50 pm |
| Charles Packer wrote:
>
> I need to do the following simple interprocess communication (IPC)
> among these processes that are all on the same box:
> -- A daemon waits for "I'm here" announcements from multiple clients
> -- One or more clients send an "I'm here" to the daemon upon command
> via the client's GUI (Each client's GUI is viewed by a different
> human user)
> The daemon retransmits "X is here" to all clients when it receives
> any "I'm here".
>
> I read some tutorials on message queues and sockets and have tried
> their examples, but that's the extent of my experience in this area.
> Since I'm going to have to invest a significant amount of time
> learning molecular-level trivia about IPC to implement the application
> in C, I'd like some opinions as to which IPC scenario -- sockets,
> message queues, etc. is most appropriate for my application model.
Those things are all system specific extensions to the C language,
and thus are off topic on c.l.c. where discussion is limited to
things defined by the various ISO C standards. In some respects
comp.programming might be suitable, but I suspect you have already
selected the optimum newsgroup in c.u.p. F'ups set.
--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
| |
| Rich Teer 2004-12-20, 5:50 pm |
| On Mon, 20 Dec 2004, Charles Packer wrote:
[clc removed from newsgroup list, as this is OT over there.]
> I need to do the following simple interprocess communication (IPC) among these
> processes that are all on the same box:
> -- A daemon waits for "I'm here" announcements from multiple clients
> -- One or more clients send an "I'm here" to the daemon upon command
> via the client's GUI (Each client's GUI is viewed by a different
> human user)
> The daemon retransmits "X is here" to all clients when it receives any "I'm here".
Depending on how portable your application needs to be, Doors are worth
investigating. They're native to Solaris, and an implementation for
Linux is being worked on.
HTH,
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming"
. * * . * .* .
. * . .*
President, * . . /\ ( . . *
Rite Online Inc. . . / .\ . * .
.*. / * \ . .
. /* o \ .
Voice: +1 (250) 979-1638 * '''||''' .
URL: http://www.rite-online.net ******************
|
|
|
|
|