From: Francis Cianfrocca Date: 2007-10-10T21:51:15+09:00 Subject: Re: Inter-Process Messaging ------=_Part_20633_10271424.1192020676534 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 10/10/07, Daniel DeLorme wrote: > > What are the possibilities in ruby for passing information from one > process to another? Specifically, I'm thinking of messaging between a > parent process and its forked child. > > Right now I can think of some messaging primitives: > - TCPServer/TCPSocket > - UNIXServer/UNIXSocket (unstable?) > - IO.pipe (doesn't need port#) > - Process.kill (impossible to send data) > > And some messaging libraries: > - DRb (standard) > - eventmachine (efficient?) > > ...what else? And, if anyone has the experience, what are the > advantages/disadvantages of each in terms of speed, reliability, system > resources? Intramachine messaging with any of the technologies you mentioned will be pretty lightweight. The usual thing one tries to do with related processes is to open a pipe or a socketpair in the parent. Then after the fork, just send data over the sockets. ------=_Part_20633_10271424.1192020676534--