Message Queues for Web Applications

Preview:

DESCRIPTION

A short introduction to message queues for web developers. Presented at the first Cambridge Geek Night

Citation preview

gareth rushgrove | morethanseven.net

Message QueuesAsynchronous Messaging for Web Apps

Cambridge Geek Night 9th June 2009

http://www.flickr.com/photos/le_haricot/132869163/

Gareth Rushgrove

gareth rushgrove | morethanseven.net

morethanseven.net

gareth rushgrove | morethanseven.net

How The Web Works

http://www.flickr.com/photos/aftab/3364835006/

Make an HTTP Request

gareth rushgrove | morethanseven.net

Get an HTTP Response

gareth rushgrove | morethanseven.net

Not Just Browsers

gareth rushgrove | morethanseven.net

Not Just People

gareth rushgrove | morethanseven.net

http://www.flickr.com/photos/12009357@N08/1204911091/

A Common Pattern

gareth rushgrove | morethanseven.net

Make an HTTP Request to a Third Party

gareth rushgrove | morethanseven.net

Get an HTTP Request to a Third Party

gareth rushgrove | morethanseven.net

http://www.flickr.com/photos/saxonmoseley/24523450/gareth rushgrove | morethanseven.net

A Common Problem

Fail Whale

gareth rushgrove | morethanseven.net

Now What?

gareth rushgrove | morethanseven.net

Spinning Beach Ball of Death

gareth rushgrove | morethanseven.net

http://www.flickr.com/photos/fernando/226930122/

Design for Failure

gareth rushgrove | morethanseven.net

Message Queue

Introduce A Message Queue

gareth rushgrove | morethanseven.net

And Response Quickly to the Browser

gareth rushgrove | morethanseven.net

Message Queue

Send An HTTP Request

gareth rushgrove | morethanseven.net

Message Queue

Failure Has No Effect On The Browser

gareth rushgrove | morethanseven.net

Message Queue

And We Can Try Again Later

gareth rushgrove | morethanseven.net

Message Queue

And Post to Multiple Third Parties

gareth rushgrove | morethanseven.net

And How

gareth rushgrove | morethanseven.net http://www.flickr.com/photos/kaptainkobold/860885199/

gareth rushgrove | morethanseven.net

Message Queue Libraries in...

Ruby and Python and Java and Erlang and Scala and C# and Lua and PHP and...

gareth rushgrove | morethanseven.net

Message Queue Protocols

STOMP and AMQP and Memcache

gareth rushgrove | morethanseven.net

Message Queue Software

RabbitMQ and Stompserver and ZeroMQ and Morbid and ApacheMQ and Starling and Beanstalk and Kestrel and MemcacheQ

gareth rushgrove | morethanseven.net

Simple Starting Point

RabbitMQ and Stompserver and ZeroMQ and Morbid and ApacheMQ and Starling and Beanstalk and Kestrel and MemcacheQ

gareth rushgrove | morethanseven.net

Great for Production

RabbitMQ and Stompserver and ZeroMQ and Morbid and ApacheMQ and Starling and Beanstalk and Kestrel and MemcacheQ

gareth rushgrove | morethanseven.net

Questions?

http://www.flickr.com/photos/luiscdiaz/330340600/

Recommended