Nameed pipes Vs sockets

Discussion in 'Perl Misc' started by Palaniappan, Jun 11, 2004.

  1. Palaniappan

    Palaniappan Guest

    Hi all,
    Now i am using two named pipes for Inter Process communication (IPC).
    will i get speed advantage if i use sockets ?.
    which one is best for perl IPC ?
    anybody analyzed this earlier in perl ?

    Thanks in advance,
    palani
    Palaniappan, Jun 11, 2004
    #1
    1. Advertising

  2. Palaniappan

    Ben Morrow Guest

    Quoth (Palaniappan):
    > Hi all,
    > Now i am using two named pipes for Inter Process communication (IPC).
    > will i get speed advantage if i use sockets ?.


    Benchmark it and see. Which is faster almost certainly depends
    critically on your OS.

    > which one is best for perl IPC ?


    They are different... with sockets, you get one filehandle for full
    duplex communication, and you get proper connection handling; OTOH, you
    have to mess with accepting connections. With fifos you can just open
    them and get on with it, OTOH so can someone else and make a right mess
    of your data. INET-domain sockets are also far more portable than either
    fifos or Unix-domain sockets.

    Decide based on your program's needs, rather than on some ficticious
    idea that one approach will be significantly more performant than the
    other.

    Ben

    --
    All persons, living or dead, are entirely coincidental.
    Kurt Vonnegut
    Ben Morrow, Jun 11, 2004
    #2
    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. piyush
    Replies:
    0
    Views:
    1,834
    piyush
    Jul 14, 2004
  2. Brian Hann

    IPC::Run and hanging pipes

    Brian Hann, Dec 8, 2003, in forum: Perl
    Replies:
    1
    Views:
    762
    Brian Hann
    Dec 11, 2003
  3. trt.
    Replies:
    1
    Views:
    584
    Michael Abootorab
    Mar 15, 2005
  4. Marilyn Davis

    sockets and pipes and bad results

    Marilyn Davis, Sep 25, 2004, in forum: Python
    Replies:
    0
    Views:
    355
    Marilyn Davis
    Sep 25, 2004
  5. yuanyun.ken
    Replies:
    3
    Views:
    343
    Tom Anderson
    Nov 5, 2008
Loading...

Share This Page