# Inter-Process Messaging

**URL:** <https://rubytalk.org/t/inter-process-messaging/41294>\
**Category:** ruby-talk\
**Created:** [10 October 2007 15:30 UTC](https://rubytalk.org/t/inter-process-messaging/41294 "2007-10-10T15:30:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piet\_Hadermann](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@Piet\_Hadermann](https://rubytalk.org/u/Piet_Hadermann)\
**Post date:** [10 October 2007 15:30 UTC](https://rubytalk.org/t/inter-process-messaging/41294/1 "2007-10-10T15:30:14Z")

</div>

Check [http://sysvipc.rubyforge.org/](http://sysvipc.rubyforge.org/)

It offers support for IPC message queues (and also shared memory and  
semaphores if needed).  
No need for polling. You can request a message (of a certain type of  
needed), and your ruby process just holds until a message of that type  
is available on the queue.

I've used it for \> 1 year in a setup where a C++ process dispatches  
messages that are handled by several parallel ruby processes.

Very light-weight and must have handled millions of messages without any  
problem by now. (won't work on Windows though)

Piet.

> **···**
>
> > -----Original Message-----  
> > From: Daniel DeLorme [mailto:dan-ml@dan42.com]
> > 
> > Markus Schirp wrote:  
> > \>  
> > \> shared memory?
> > 
> > Is there a ruby lib to handle shared memory? Also, I can see  
> > how it can be used for "passing information", but for  
> > messaging between processes wouldn't it require constant  
> > polling to check if a message is waiting in the shared memory?
