1. “RabbitMQ
python and ruby staring
at the looking glass”
- an asynchronous tale -
• http://www.slideshare.net/hungryblank
• http://github.com/hungryblank/rabbitmq_rupy_2009
Paolo Negri @hungryblank
5. AMQP
Why is it interesting?
“We use asynchronicity heavily in those
cases where performance is an issue.
This is generally where we send content
from one peer to another. We send off
methods as fast as possible without
waiting for confirmations”
AMQP Specs [0.8 June 2006]
6. Summary
“AMQP as a case of asynchronous
protocol implementation in python
and ruby”
9. AMQP
Implementations
• Producer/Consumer: libs available for
python and ruby
• Broker no python or ruby
implementation
10. • RabbitMQ is an implementation of
AMQP Broker
• It’s opensource
• Written in Erlang
11. Erlang?
• general-purpose concurrent programming
language designed by Ericsson
• first version written by J. Armstrong in 1986
• distributed
• fault tolerant
• soft real time
• high availability
12. Erlang?
Erlang's main strength is support for
concurrency
“Process communication is done via a
shared-nothing asynchronous message
passing:
every process has a “mailbox”, a queue
of messages sent by other processes,
that are not yet consumed” (Wikipedia)
19. Reactor Pattern
• Non blocking IO and lightweight
concurrency
• eliminate the complexities of high-
performance threaded network
programming
20. synchronous asynchronous
process Time process
code code
network network
operation Free
operation
use network use network
operation operation
Callback
result result
Free
Free
21. Not only reactor
Some of the libs provide more i.e. eventlet
provides also coroutines
22. Python, pick one
pika
• asyncio is part of python stdlib
• easy syntax
• developer member of RabbitMQ team
• fits on slides :-P