Daniel DeLorme wrote:
Thanks for all the answers. I now have:
primitives:
- TCPServer/TCPSocket
- UNIXServer/UNIXSocket
- IO.pipe
- named pipes
- shared memory (can't find low-level lib?)
possibly mmap: http://moulon.inra.fr/ruby/mmap.html
libraries: (after some digging on rubyforge)
- DRb
- Event Machine
- ActiveMessaging
- Slave
- BackgroundDRb
- System V IPC
- POSIXIPC (not released)
- reliable-msg
- MPI Ruby
- stomp / stompserver / stompmessage
- AP4R (Asynchronous Processing for Ruby)Frankly I'm still not entirely clear on what are the advantages of each, both in terms of features and in terms of performance. I guess I'll just have to write some code to find out...
Daniel
1. You missed Rinda, a Linda derivative layered on top of DRb.
2. There are basically two ways to do concurrency/parallelism: shared memory and message passing. I'm not sure what the *real* tradeoffs are -- I've pretty much had my brain hammered with "shared memory bad -- message passing good", but there obviously must be *some* counter-arguments, or shared memory wouldn't exist.
The way I look at it, Re: trade-offs, message passing is nice
because the API doesn't change whether the receiver is on localhost
or over the wire.
Shared memory is nice for very high bandwidth between processes;
say process A decodes a 300MB TIFF image into memory and wants
to make the bitmap available to process B.
3. System V IPC has three components -- message queues, semaphores, and shared memory segments. So ... if you've found a System V IPC library, you've found a shared memory library.
Regards,
Bill
···
From: "M. Edward (Ed) Borasky" <znmeb@cesmail.net>