Interprocess communication: which scenario?

Discussion in 'C Programming' started by Charles Packer, Dec 20, 2004.

  1. 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, Dec 20, 2004
    #1
    1. Advertising

  2. Charles Packer

    SnaiL Guest

    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 :)
    SnaiL, Dec 20, 2004
    #2
    1. Advertising

  3. Charles Packer

    dandelion Guest

    Re: Interprocess communication: which scenario? [OT]

    "Charles Packer" <> wrote in message
    news:...

    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/articles/named_pipes.html
    http://librenix.com/?inode=4423
    dandelion, Dec 20, 2004
    #3
  4. Charles Packer

    CBFalconer Guest

    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 () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
    CBFalconer, Dec 20, 2004
    #4
  5. Charles Packer

    Guest

    , Dec 22, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Swapnajit Mittra
    Replies:
    0
    Views:
    435
    Swapnajit Mittra
    Dec 21, 2004
  2. Dave Bartlett

    newbie question: interprocess communication

    Dave Bartlett, May 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    487
    DalePres
    May 13, 2004
  3. James  Aguilar
    Replies:
    3
    Views:
    541
    Aguilar, James
    Dec 20, 2005
  4. Michael Butscher
    Replies:
    7
    Views:
    337
    Lawrence D'Oliveiro
    Jul 1, 2006
  5. exhuma.twn
    Replies:
    23
    Views:
    1,000
    Steve Holden
    Feb 18, 2007
Loading...

Share This Page