WTF Is Messaging And Why You Should Use It?

Post on 17-May-2015

19,534 views 1 download

Tags:

transcript

WTF Is Messaging And Why You Should Use It?

@botanicusRabbitMQ team of

VMware

Sunday, 12 June 2011

I slept only 3 hours, Club-mate is the only thing which

keeps me goin’ ... but I’ll do my best :)

Club-mate FTW!Sunday, 12 June 2011

About Me

Ruby & JS contractor

RabbitMQ team of VMware

London, UK

http://twitter.com/botanicus

http://blog.101ideas.cz

Sunday, 12 June 2011

What Is Messaging?Sending messages between isolated entities (usually apps, but can be also threads, as in Erlang).

Usually through a messaging broker.

Asynchronous, suitable for distributed systems.

Push, not pull.

Sunday, 12 June 2011

From http://www.j5live.com

Sunday, 12 June 2011

How Can You Benefit?

Better design of apps.

Scalability.

Robustness.

Sunday, 12 June 2011

#1 Better Design, Easier MaintainanceDecoupling -> small, isolated apps.

Greatly reduces complexity.

Isolation -> it's easy to rewrite just the critical parts into Java or C.

Simple integration with legacy systems, no need to rewrite everything.

It's dead-easy to inspect what's going through.

Sunday, 12 June 2011

Sunday, 12 June 2011

#2 Scalability

Improve responsiveness by doing CPU-intensive tasks later in an asynchronous manner.

Scale only the parts which requires it.

Sunday, 12 June 2011

Sunday, 12 June 2011

Sunday, 12 June 2011

#3 Robustness

Backend deployment with no downtime (see the schema).

Message persistency.

Acknowledgements (I've done it, send me the next task).

Sunday, 12 June 2011

What if the service would go offline?

Sunday, 12 June 2011

Sunday, 12 June 2011

Pub/SubPublishers do not send messages to specific subscribers. Published messages are characterised into classes, without knowledge of the subscribers. Subscribers express interest in some classes, and only receive messages they want.

Sunday, 12 June 2011

Sunday, 12 June 2011

Other Use-Cases

From a browser utilising websockets (games development etc).

Remote procedure call.

Sunday, 12 June 2011

#1 AMQP in BBC

Realtime Tweets Processing.

As middlewares (download, process, store to S3).

1000 tweets/sec = about 90 million a day.

Sunday, 12 June 2011

Protocols & APIs

AMQP

STOMP: HTTP-like protocol, headers & body, request/response

JMS

Amazon Simple Queue Service

XMPP (well, kind of)

Websockets

Sunday, 12 June 2011

AMQP

Invented by JP Morgan.

Most widely used.

Binary protocol with minimal overhead.

http://www.rabbitmq.com/getstarted.html

Sunday, 12 June 2011

Sunday, 12 June 2011

AMQP natively, STOMP, XMPP by plugins.

Most widely used OSS AMQP broker.

A lot of plugins available, writing new ones is quite easy (Erlang).

RabbitMQ

Sunday, 12 June 2011

ZeroMQ

Brokerless, provides socket-like API.

Supports advanced routing.

Leads to decentralised architecture.

Sunday, 12 June 2011

Sunday, 12 June 2011

Questions please!

Sunday, 12 June 2011

Cheers for your attention!

Sunday, 12 June 2011