Musings about Coding, Business and other Geek Stuff Live and Direct from somewhere on the planet
June 29, 2006
Rails, Queues and Mongrel?

After having been through some major Java and MQ Series root canal surgery in the last few days, I’m thinking that while MQ (an IBM product) really is ridiculously evil the queue type system is fairly useful in itself.

Then in a mid meeting psychosis day dream state I realized that it wouldn’t be particularly hard to at least rustle up a quick rest based Queue framework in Ruby. I’m thinking Camping on Mongrel would be particularly suitable for this. Think REST and ActiveResource as the API.

Should not take too long to develop. The big question is if there really is a need for a Queueing based system for Rubyistas?

Posted by pelleb at June 29, 2006 03:36 AM | TrackBack
This entry was posted in the following Categories: Ruby , Web Services
Comments

You might want to look into ActiveMQ ( http://incubator.apache.org/activemq/ ) and the Stomp ( http://stomp.codehaus.org/ ) wire transport. I know it works well outside of Rails, and that ActiveMessaging is working to do a Rails-like messaging system which happens to hook nicely into rails.

Posted by: Brian McCallister on June 29, 2006 04:46 AM

Why not just use the Ruby client for Stomp...

http://rubyforge.org/projects/stomp/

More detail here...
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/165089
http://stomp.codehaus.org/Ruby+Client

It has full support for load balancing, failover, recovery, optional persistence, transactions, publish subscribe and queue based together with a management console, browsing of queues etc.

Posted by: James Strachan on June 29, 2006 05:20 AM

More on ActiveMessaging here

http://jroller.com/page/obie?entry=activemessaging_coming_soon

Posted by: James Strachan on June 29, 2006 05:22 AM

Finally found ActiveMessaging after much googling :)

http://dev.tirsen.com/trac/activemessaging

Posted by: James Strachan on June 29, 2006 05:24 AM

Thanks everyone. I really like ActiveMQ and the idea of Stomp, but what I'm really looking for is a tiny little all ruby self contained app.

ActiveMessaging might be an approach to handling messages. I think MessageHandler is one of the few nice things in J2EE and ActiveMessaging looks nice and simple like that.

But I think a ruby queue would be really simple and quick to write in particularly with something like Camping on Mongrel.

I think the real question is if there really is a need for it. I think I do have an app or two that could use it. If I do I might write one.

I deploy all my rails apps on OpenBSD, which I believe still isn't to stable for running java apps on, which is another reason I would like a really low overhead Ruby version.

Posted by: Pelle Braendgaard on June 29, 2006 06:54 PM

I'm down on the whole thing. I've been working to replace all that with my own design based on queueless messaging (in Java, PHP, C). The result is much cleaner, and less code overall, as you eliminate all the fixup code that slides in when the infrastructure fails on some promise.

So far, I've only got one system working full-scale, but the results were great: less code, a doubling of speed, and no drop off in reliability (I didn't really measure that part). It's all based on the SDP1 datagram packet.

I'd wonder if the MQ concepts are far bigger than necessary, sucking in all sorts of things that seem to be good and obvious ideas such as guaranteed delivery, but failing to deliver these in some sense or other.

Posted by: Iang on July 1, 2006 11:01 AM

I installed ActiveMQ and Activemessaging on the Rails-based backend I'm building for work. If it turns out to be reliable, I'm a huge fan. All it does is send text around, to the listeners that want it, and it load-balances!

Plus the install was painless.

Posted by: Chris Anderson on September 18, 2006 03:24 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?