Francis Cianfrocca wrote: > On 10/10/07, Daniel DeLorme <dan-ml / dan42.com> 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. > There's also a Ruby MPI binding, but I'm not sure how well maintained it is. I had trouble tracking it down on the web. So I'd go with EventMachine, because that *is* well maintained.