wtf is messaging and why you should use it?

26
WTF Is Messaging And Why You Should Use It? @botanicus RabbitMQ team of VMware Sunday, 12 June 2011

Upload: james-russell

Post on 17-May-2015

19.534 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: WTF Is Messaging And Why You Should Use It?

WTF Is Messaging And Why You Should Use It?

@botanicusRabbitMQ team of

VMware

Sunday, 12 June 2011

Page 2: WTF Is Messaging And Why You Should Use It?

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

Page 3: WTF Is Messaging And Why You Should Use It?

About Me

Ruby & JS contractor

RabbitMQ team of VMware

London, UK

http://twitter.com/botanicus

http://blog.101ideas.cz

Sunday, 12 June 2011

Page 4: WTF Is Messaging And Why You Should Use It?

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

Page 5: WTF Is Messaging And Why You Should Use It?

From http://www.j5live.com

Sunday, 12 June 2011

Page 6: WTF Is Messaging And Why You Should Use It?

How Can You Benefit?

Better design of apps.

Scalability.

Robustness.

Sunday, 12 June 2011

Page 7: WTF Is Messaging And Why You Should Use It?

#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

Page 8: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 9: WTF Is Messaging And Why You Should Use It?

#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

Page 10: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 11: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 12: WTF Is Messaging And Why You Should Use It?

#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

Page 13: WTF Is Messaging And Why You Should Use It?

What if the service would go offline?

Sunday, 12 June 2011

Page 14: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 15: WTF Is Messaging And Why You Should Use It?

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

Page 16: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 17: WTF Is Messaging And Why You Should Use It?

Other Use-Cases

From a browser utilising websockets (games development etc).

Remote procedure call.

Sunday, 12 June 2011

Page 18: WTF Is Messaging And Why You Should Use It?

#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

Page 19: WTF Is Messaging And Why You Should Use It?

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

Page 20: WTF Is Messaging And Why You Should Use It?

AMQP

Invented by JP Morgan.

Most widely used.

Binary protocol with minimal overhead.

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

Sunday, 12 June 2011

Page 21: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 22: WTF Is Messaging And Why You Should Use It?

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

Page 23: WTF Is Messaging And Why You Should Use It?

ZeroMQ

Brokerless, provides socket-like API.

Supports advanced routing.

Leads to decentralised architecture.

Sunday, 12 June 2011

Page 24: WTF Is Messaging And Why You Should Use It?

Sunday, 12 June 2011

Page 25: WTF Is Messaging And Why You Should Use It?

Questions please!

Sunday, 12 June 2011

Page 26: WTF Is Messaging And Why You Should Use It?

Cheers for your attention!

Sunday, 12 June 2011