Hi,
== Context ==
I need a messaging system to have rails pushing tasks to processes in a
distributed environment. I need this to be small and hacker friendly, so
Stompserver and activemessaging looked good to me. There are some needs
that I can’t address as is with Stompserver and ActiveMessaging so I’m
currently hacking them for the following:
- make Stompserver use a database for storing queues instead of relying
on Madeleine. Madeleine is interesting but I’m not sure I understand the
limitations of the journaling (I’ve only looked briefly at Madeleine’s
code) + I need a way to inspect the queue backlogs to monitor the whole
environment so a journal isn’t really what I’m after, a traditionnal
database is far better for this. - as I want messages to stay in queue instead of being dispatched to
subscribers if they are already busy, I’m delaying messages for
subscribers with “ack: client” until they send an ack back (this helps
with load distribution and can avoid stompserver being blocked for a
while when a new subscriber comes). - this means that I have to modify ActiveMessaging to support
acknowledgment (or support it more naturally).
== Current state ==
Unreadable I’m a little hard on myself, but even if for example the
DB support in Stompserver works, I’ve lots of cleanups to do…
I began with the Madeleine -> ActiveRecord port which put pieces of
StompServer’s code all around on the floor It runs now (though I’m
seeing warnings when I serialize the frames to a TEXT column :
Exception `TypeError’ at
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:2068
- can’t clone Fixnum).
I’ve implemented my modified ack/queuing behaviour in Stompserver and am
currently switching my attention to ActiveMessaging.
== Questions ==
Is anyone else interested in these modifications?
The more fair load distribution is completely independent of the DB
support so I could push a patch for Stompserver rather easily. Don’t
know yet for ActiveMessaging.
The DB support is more invasive that I though it would be, I began
thinking I could somehow allow users to choose a storage backend between
Madeleine and ActiveRecord at runtime but I let this behind for the
moment. If there’s interest in having a one-size fits all, I can look
into it.
Has someone a tip for the TypeError I get (described above)? It seems
harmless, but I don’t like having harmless warnings next to real error
messages
== Thanks ==
Thanks for both StompServer and ActiveMessaging. It will probably save
me quite some development time (this is why I’m willing to contribute
back).
Best regards,
Lionel