Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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]
[holli]: like dorothy?
[james28909]: see ya later holli
[james28909]: yeah like wizard of oz lol. its just a joke though
[james28909]: i cannot understand how someone cant see that a cloud of gas that evolves into a solar system or galaxies. it just makes sense to me. everythign that has happened, had to have happened for anything on this planet to be.
[james28909]: /gas/gas and debris/
[james28909]: another thing, i used to be atheist. life experiences, personal evidence. and my own perception is the reason why i believe the things i do.
[erix]: and now you are agnostic?
[james28909]: arunbear, your picking bits of history to fit your own narrative. right now, humans are smarter than in any of those times.
[james28909]: in order for there to be a mutation, there has to be a universe with laws setup that even allow a mutation.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2017-12-15 14:48 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (433 votes). Check out past polls.