Hey Wink,

There's a group of people who are clamouring for a Ruby answer to JMS.  Not sure if that's what you're aiming for with this, but I'd say it's worth it if you can get it to work.

The main thing to worry about (based on my experience) is the following:

- Ruby's Garbage Collector isn't all that great.  It'll thrash your C code unless you basically register your C objects with it in some way.  This means for you (as it did for me) that even if you're storing the C memory in an internal data structure you still need to store the attached Ruby objects into a Hash.  This double storage really impacts performance.
	* And before someone tries to answer this complaint by explaining that you can register objects with the GC, I would like to refer you to your nearest library to go read the runtime estimates for removing a random object from a linked list.
- Added to the above is the problem that the GC isn't all that great and will cause massive pauses if you don't manage the memory carefully on the C side of things.
+ Ruby's C extension API is fantastic.  It'll be cake to work with compared with any of the others.  The only API I thought was better was Lua's, but it's also weird.
+ Ruby's Garbage Collector works better with C code than Java's.
- Test your code with a Thread that creates lots of randomly sleeping Threads.  This is how I discovered the Ruby problem.
- If you want your code to work on many platforms, then you'll be stuck writing it cross platform for windows.  If you can do it in pure Ruby then you're ok.
- Ruby's performance ain't so hot.  1.9 is supposed to be fixing this when it comes out.

Otherwise I think you could work it, and there'd be a market for it possibly.

Zed A. Shaw
http://www.zedshaw.com/


On Mon, 12 Sep 2005 02:29:42 +0900
Wink Saville <wink / saville.com> wrote:

> Zed A. Shaw wrote:
> 
> Hello,
> 
> I'm a Ruby newb but have been programming for many years and have been 
> attracted to Ruby from the good things I've read about it on the Net. 
> I'm responding to the RFC because we've implemented a messaging system 
> in C and have been investigating adding messaging to Ruby.
> 
> The could be relevant to this discussion because my understanding is 
> that Ruby/Event's main purpose is provide asynchronous notification to a 
> application which is the same purpose of the messaging system.
> 
> In the messaging system we've done, the messages are sent and processed 
> asynchronously, and sending a message will be guaranteed never to block 
> the sender and the receiver receive one message at a time. This has 
> profound effect that a system can be composed of many (100's or 1000's 
> or ...) of independent objects (threads/components) all communicating 
> and working without the need for mutual exclusion objects 
> (mutex/critical sections). Is there any reason to believe this won't work?
> 
> Zed, does this strike you as interesting or related?
> 
> Is this interesting to anyone else?
> 
> 
> Regards from a newb,
> 
> Wink
> 
>