<br><br><div class="gmail_quote">2011/8/22 Almudena <span dir="ltr"><<a href="mailto:almumontiel@gmail.com">almumontiel@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":106">I am new to rabbitMQ and I quite not understand completely the whole<br>
thing. </div></blockquote><div><br>Then I recommend starting with <a href="http://bit.ly/amqp-model-explained">http://bit.ly/amqp-model-explained</a> and the rest of <a href="http://bit.ly/amqp-gem-docs">http://bit.ly/amqp-gem-docs</a>.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div id=":106">I am trying to use the messaging technology to implement the<br>
"load balancing" of my webserver, and with this I mean to distribute<br>
the calls made to my website into several clients.<br>
I would like to get answers quickly from my server, and no matter if<br>
it is the very last information, but the most approximate calculated<br>
by the clients (the application is a monitor system for my<br>
infrastructure, and it should collect info from many machines).<br>
<br></div></blockquote><div><br>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<br>
<br><a href="http://rubydoc.info/github/ruby-amqp/amqp/master/file/docs/PatternsAndUseCases.textile#Command_pattern">http://rubydoc.info/github/ruby-amqp/amqp/master/file/docs/PatternsAndUseCases.textile#Command_pattern</a><br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div id=":106">
I have read about <a href="https://github.com/auser/alice" target="_blank">https://github.com/auser/alice</a>, but I am not sure<br>
how to connect it with my interface.<br></div></blockquote><div><br>Alice is deprecated. You should take a look at RabbitMQ management plugin instead (but it is implemented in Erlang<br>so if you want to use Ruby with Sinatra, there is probably not a lot to see).<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div id=":106">
<br>
I am using Sinatra to implement the server, and I would like to<br>
connect my REST interface to rabbitMQ.<br>
<br>
Do you think this is a use case that could be implemented?</div></blockquote></div><br>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<br>
any responses from other apps over AMQP. Can you elaborate on this? Thank you.<br clear="all"><br>-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br><a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br>
<br>