[rabbitmq-discuss] sinatra web server

Michael Klishin michael.s.klishin at gmail.com
Mon Aug 22 11:28:49 BST 2011

2011/8/22 Almudena <almumontiel at gmail.com>

> I am new to rabbitMQ and I quite not understand completely the whole
> thing.

Then I recommend starting with http://bit.ly/amqp-model-explained and the
rest of http://bit.ly/amqp-gem-docs.

> I am trying to use the messaging technology to implement the
> "load balancing" of my webserver, and with this I mean to distribute
> the calls made to my website into several clients.
> I would like to get answers quickly from my server, and no matter if
> it is the very last information, but the most approximate calculated
> by the clients (the application is a monitor system for my
> infrastructure, and it should collect info from many machines).
You can publish commands to your applications that do computation work and
cache it in Redis (if you need persistence) or Memcached (if you don't mind
losing results when power is switched off), then use Dalli (a Ruby Memcached
client that I cannot recommend enough) to fetch the result. The Command
pattern is explained at


> I have read about https://github.com/auser/alice, but I am not sure
> how to connect it with my interface.

Alice is deprecated. You should take a look at RabbitMQ management plugin
instead (but it is implemented in Erlang
so if you want to use Ruby with Sinatra, there is probably not a lot to

> I am using Sinatra to implement the server, and I would like to
> connect my REST interface to rabbitMQ.
> Do you think this is a use case that could be implemented?

What you are trying to do is a common thing but I am not sure I fully
understand if you need mostly 1-way communication or 2-way. Implementation
details all come down to whether your Sinatra app expects to receive
any responses from other apps over AMQP. Can you elaborate on this? Thank


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110822/0e8492f4/attachment.htm>

More information about the rabbitmq-discuss mailing list