Interoperability With RabbitMq

10,871 views
10,666 views

Published on

Presentation held at Shanda Innovation offices in Shanghai, March 2010.

Published in: Technology
4 Comments
11 Likes
Statistics
Notes
No Downloads
Views
Total views
10,871
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
270
Comments
4
Likes
11
Embeds 0
No embeds

No notes for slide

Interoperability With RabbitMq

  1. 1. Interoperability with RabbitMQ by Alvaro Videla at Shanda Innovation - March 2010 Thursday, March 18, 2010
  2. 2. About Me • Lead Developer at TheNetCircle.com • Twitter: @old_sound • Blog: http://obvioushints.blogspot.com/ • Thursday, March 18, 2010
  3. 3. The Interoperability Problem Thursday, March 18, 2010
  4. 4. The Problem Movie Publisher Thursday, March 18, 2010
  5. 5. The Problem Movie New Movie Publisher Thursday, March 18, 2010
  6. 6. The Problem Java WebService XML Movie New Movie Publisher Thursday, March 18, 2010
  7. 7. The Problem Java WebService XML C++ Image Thumbnail Generator Movie New Movie Publisher Thursday, March 18, 2010
  8. 8. The Problem Java WebService XML C++ Image Thumbnail Generator Movie New Movie Publisher PHP PHP Cache Generator Thursday, March 18, 2010
  9. 9. The Problem Java WebService XML C++ Image Thumbnail Generator Movie New Movie Publisher PHP PHP Cache Generator PHP Static HTML Publisher Thursday, March 18, 2010
  10. 10. The Problem Java WebService XML C++ Image Thumbnail Generator Movie New Movie Publisher PHP PHP Cache Generator PHP Static HTML Publisher PHP Trailers Generator Thursday, March 18, 2010
  11. 11. The Problem SYSTEMS WebService XML Image Thumbnail Generator PHP Cache Generator Static HTML Publisher Trailers Generator Thursday, March 18, 2010
  12. 12. The Problem SYSTEMS WebService XML Written In Different Languages Image Thumbnail Generator PHP Cache Generator Static HTML Publisher Trailers Generator Thursday, March 18, 2010
  13. 13. The Problem SYSTEMS WebService XML Written In Different Languages Image Different Operating Systems Thumbnail Generator PHP Cache Generator Static HTML Publisher Trailers Generator Thursday, March 18, 2010
  14. 14. The Problem SYSTEMS WebService XML Written In Different Languages Image Different Operating Systems Thumbnail Generator Written By Different People PHP Cache Generator Static HTML Publisher Trailers Generator Thursday, March 18, 2010
  15. 15. The Problem SYSTEMS WebService XML Written In Different Languages Image Different Operating Systems Thumbnail Generator Written By Different People PHP Cache Generator They Need To Share Information Static HTML Publisher Trailers Generator Thursday, March 18, 2010
  16. 16. The Problem SYSTEMS WebService XML Written In Different Languages Image Different Operating Systems Thumbnail Generator Written By Different People PHP Cache Generator They Need To Share Information Static They Need Real Time Data HTML Publisher Trailers Generator Thursday, March 18, 2010
  17. 17. The Problem SYSTEMS WebService XML Written In Different Languages Image Different Operating Systems Thumbnail Generator Written By Different People PHP Cache Generator They Need To Share Information Static They Need Real Time Data HTML Publisher They Need To Scale Trailers Generator Thursday, March 18, 2010
  18. 18. Is There a Solution? Thursday, March 18, 2010
  19. 19. AMQP and RabbitMQ Thursday, March 18, 2010
  20. 20. AMQP • Advanced Message Queuing Protocol • Suits Interoperability • Completely Open Protocol • Binary Protocol • AMQP Model • AMQP Wire Format Thursday, March 18, 2010
  21. 21. AMQP Model • Exchanges • Message Queues • Bindings • Rules for binding them Thursday, March 18, 2010
  22. 22. AMQP Wire Protocol • Functional Layer • Transport Layer Thursday, March 18, 2010
  23. 23. Message Flow http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/chap-Messaging_Tutorial-Initial_Concepts.html Thursday, March 18, 2010
  24. 24. Exchange Types • Fanout • Direct • Topic Thursday, March 18, 2010
  25. 25. Default Exchanges • amqp.fanout • amqp.direct • amqp.topic Thursday, March 18, 2010
  26. 26. http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts- Fanout_Exchange.html Thursday, March 18, 2010
  27. 27. http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts- Direct_Exchange.html Thursday, March 18, 2010
  28. 28. http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts- Topic_Exchange.html Thursday, March 18, 2010
  29. 29. Sample usage Thursday, March 18, 2010
  30. 30. Sample Usage II Thursday, March 18, 2010
  31. 31. Other Advantages • Fire and Forget • Stop/Start consumers safely (no need for last processed id) • No need for Cronjobs locks • Load Distribution • Transactions Thursday, March 18, 2010
  32. 32. RabbitMQ Thursday, March 18, 2010
  33. 33. RabbitMQ • Enterprise Messaging System • Open Source MPL • Written in Erlang/OTP • Commercial Support Thursday, March 18, 2010
  34. 34. Features • Reliable and High Scalable • Easy To install • Easy To Cluster • Runs on: Windows, Solaris, Linux, OSX • AMQP 0.8 Thursday, March 18, 2010
  35. 35. Client Libraries • Java • .NET/C# • Erlang • Ruby, Python, PHP, Perl, AS3, Lisp, Scala Thursday, March 18, 2010
  36. 36. Docs/Support • http://www.rabbitmq.com/documentation.html • http://dev.rabbitmq.com/wiki/ • #rabbitmq at irc.freenode.net • http://www.rabbitmq.com/email-archive.html Thursday, March 18, 2010
  37. 37. Our Setup: Publishers - 28 PHP Frontend Machines 2 PHP Machines running 8 consumers each Thursday, March 18, 2010
  38. 38. Our Setup • Deployed in mid 2009 • Reduced site SPOF • 400.000+ messages routed a day (and increasing) • Very easy to install/deploy Thursday, March 18, 2010
  39. 39. Easy To Install? Thursday, March 18, 2010
  40. 40. Easy To Install? http://gist.github.com/334219 Thursday, March 18, 2010
  41. 41. Show me the code! Thursday, March 18, 2010
  42. 42. Resources: • http://www.rabbitmq.com/ • https://www.amqp.org/confluence/display/AMQP/About+AMQP • http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/ Messaging_Tutorial/index.html • http://wso2.org/library/articles/using-axis2-c-amqp-transport-part-i • http://www.skaag.net/2010/03/12/rabbitmq-for-beginners/ • http://github.com/careo/rabbitmq-erlang-client-examples Thursday, March 18, 2010
  43. 43. Questions? Thursday, March 18, 2010
  44. 44. Thanks! Alvaro Videla http://twitter.com/old_sound http://www.slideshare.net/old_sound Thursday, March 18, 2010

×