Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: what else from port ?

by exilepanda (Pilgrim)
on Jul 18, 2012 at 01:44 UTC ( #982359=note: print w/replies, xml ) Need Help??

in reply to Re: what else from port ?
in thread what else from port ?

Thanks a lot!! The Pipe thing looks an easy and clean one for me to start with. But do you suggest the TCP approach is better/safer than those pipe stuff ?

Replies are listed 'Best First'.
Re^3: what else from port ?
by Corion (Pope) on Jul 18, 2012 at 07:06 UTC

    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://982359]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2018-04-24 03:14 GMT
Find Nodes?
    Voting Booth?