Personally, I try to avoid IPC. If IPC is necessary, I use either files in a directory, a database or TCP, mostly in that order. Files in a directory have the nice advantage that I only need to worry about the server or the client and can manually test things by moving files into the watched directory. A database is good for serializing access if I have more than one watcher for a resource and they all want to grab the same resource/task. I use TCP servers only if I already do some other TCP interaction, like HTTP requests or talking to a mail server etc.. All these approaches are (fairly) network transparent in the sense that as long as the directory is mounted everywhere, the processes can even run on different machines.

A Win32::Pipe has the advantage of being manually testable because you can copy files to \\.\pipe\yourpipename and your server can easily find out whether it has been started already. It only allows communication in the direction from the client to the server (I think), but you don't have much buffering problems. Using Win32::Pipe isn't that network transparent unless you have administrator privileges and can set up the users so that they are allowed to access \\machine\pipe\yourpipename from other machines.

I haven't done much with pipes, and I find the file-based approach to be the simplest approach, so I would start that.


In reply to Re^3: what else from port ? by Corion
in thread what else from port ? by exilepanda

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.