Re: Interprocess communication: which scenario? [OT]
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: Interprocess communication: which scenario? [OT]




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: Interprocess communication: which scenario? [OT]  
dandelion


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-20-04 10:50 PM


"Charles Packer" <mailbox@cpacker.org> wrote in message
news:f88bc493.0412200749.79f9a046@posting.google.com...

First off, this is *off* topic on this ng. Having said that (to appease ye
daemons of c.l.c.)

> 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".

Ok.

> 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.

Since all your processes are on the same box, i'd suggest a named pipe. They
are the
simplest method of IPC I know of yet are very usable. If you supply the
server and all
the clients with some unique id, you only need 2 pipes (they are
half-duplex), since writes
to pipes are guaranteed to be atomic (POSIX). Furthermore, they are
supported over a
range of OS's.

See
http://developers.sun.com/solaris/a...amed_pipes.html
http://librenix.com/?inode=4423








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:12 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register