Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Taming the rabbit

18,146 views

Published on

Published in: Technology

Taming the rabbit

  1. Taming The Rabbit Writing RabbitMQ Plugins Alvaro Videla - VMwareWednesday, October 24, 12
  2. About Me • Developer Advocate for Cloud Foundry • Blog: http://videlalvaro.github.com/ • Twitter: @old_soundWednesday, October 24, 12
  3. About Me • Developer Advocate for Cloud Foundry • Blog: http://videlalvaro.github.com/ • Twitter: @old_sound • I created gifsockets™Wednesday, October 24, 12
  4. About Me Co-authored RabbitMQ in Action http://bit.ly/rabbitmqWednesday, October 24, 12
  5. RabbitMQWednesday, October 24, 12
  6. RabbitMQ • Enterprise Messaging System • Open Source MPL • Written in Erlang/OTP • Messaging via AMQP • Acquired by Spring Source (VMware)Wednesday, October 24, 12
  7. Features • Reliable and High Scalable • Easy To install • Easy To Cluster • Runs on: Windows, Solaris, Linux, OSX • AMQP 0.8 - 0.9.1Wednesday, October 24, 12
  8. Wednesday, October 24, 12
  9. Extensible • Plugin System • Official Plugins • Community PluginsWednesday, October 24, 12
  10. Extensible • Plugin System • Official Plugins • Community Plugins • Plugins must be written in ErlangWednesday, October 24, 12
  11. Wednesday, October 24, 12
  12. What can you do with plugins?Wednesday, October 24, 12
  13. Add new ProtocolsWednesday, October 24, 12
  14. STOMPWednesday, October 24, 12
  15. STOMP COMMAND header1:value1 header2:value2 Body^@Wednesday, October 24, 12
  16. STOMP CONNECT accept-version:1.1 host:stomp.github.org ^@Wednesday, October 24, 12
  17. STOMP CONNECTED version:1.1 ^@Wednesday, October 24, 12
  18. Websockets + STOMP = WebSTOMPWednesday, October 24, 12
  19. Add Authentication MechanismsWednesday, October 24, 12
  20. LDAPWednesday, October 24, 12
  21. SSLWednesday, October 24, 12
  22. Add your own Message StoreWednesday, October 24, 12
  23. Must Read http://www.rabbitmq.com/blog/2011/01/20/rabbitmq- backing-stores-databases-and-disks/Wednesday, October 24, 12
  24. Wrap Erlang apps together with RabbitMQWednesday, October 24, 12
  25. cowboy-wrapperWednesday, October 24, 12
  26. ldap-wrapperWednesday, October 24, 12
  27. webmachine-wrapperWednesday, October 24, 12
  28. Add extra functionality to the brokerWednesday, October 24, 12
  29. RabbitMQ Management PluginWednesday, October 24, 12
  30. http://www.rabbitmq.com/img/management/overview.pngWednesday, October 24, 12
  31. RabbitMQ Shovel PluginWednesday, October 24, 12
  32. Create your Own ExchangesWednesday, October 24, 12
  33. Why?Wednesday, October 24, 12
  34. ExchangesWednesday, October 24, 12
  35. Message Flow http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/chap-Messaging_Tutorial-Initial_Concepts.htmlWednesday, October 24, 12
  36. AMQP Model • Exchanges • Message Queues • Bindings • Rules for binding themWednesday, October 24, 12
  37. Exchange Types • Fanout • Direct • TopicWednesday, October 24, 12
  38. http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts- Fanout_Exchange.htmlWednesday, October 24, 12
  39. http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts- Direct_Exchange.htmlWednesday, October 24, 12
  40. http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts- Topic_Exchange.htmlWednesday, October 24, 12
  41. random-exchangeWednesday, October 24, 12
  42. consistent-hash-exchangeWednesday, October 24, 12
  43. riak-exchangeWednesday, October 24, 12
  44. rabbitmq-global-fanout-exchangeWednesday, October 24, 12
  45. recent-history-exchangeWednesday, October 24, 12
  46. recent-history-exchange user_x Using the recent history exchange New Msg Last N messages Msg New Chat Room Msg Exchange Cache Cached New New New Msgs Msg Msg Msg user_a user_b user_c new_user http://manning.com/videla/Wednesday, October 24, 12
  47. Exchange BehavioursWednesday, October 24, 12
  48. recent-history-exchange Caches up to 20 messages Recent History Exchange route/2 Delivers add_binding/3 cached msgs to new client delete/3 Drops cached messages http://manning.com/videla/Wednesday, October 24, 12
  49. Env Setup hg clone http://hg.rabbitmq.com/rabbitmq-public-umbrella cd rabbitmq-public-umbrella make coWednesday, October 24, 12
  50. File Structure |-- rabbitmq-public-umbrella | |-- myplugin-folder | | | -- package.mk | | | -- MakefileWednesday, October 24, 12
  51. RabbitMQ Boot Steps https://github.com/videlalvaro/rabbit-internals/blob/master/rabbit_boot_process.mdWednesday, October 24, 12
  52. RabbitMQ Boot StepsWednesday, October 24, 12
  53. RabbitMQ Boot Steps -rabbit_boot_step({recovery, [{description, "exchange, queue and binding recovery"}, {mfa, {rabbit, recover, []}}, {requires, empty_db_check}, {enables, routing_ready}]}).Wednesday, October 24, 12
  54. RabbitMQ Boot Steps -rabbit_boot_step({msg_store_bitcask_index, [{description, "Bitcask Index for rabbit_msg_store"}, {mfa, {application, set_env, [rabbit, msg_store_index_module, ?MODULE]}}, {enables, recovery}]}). Modify Configuration at StartupWednesday, October 24, 12
  55. Demo CodeWednesday, October 24, 12
  56. Managing PluginsWednesday, October 24, 12
  57. rabbitmq-plugins $ rabbitmq-plugins list $ rabbitmq-plugins enable plugin_name $ rabbitmq-plugins disable plugin_name http://www.rabbitmq.com/man/rabbitmq-plugins.1.man.htmlWednesday, October 24, 12
  58. ACHTUNG! • Plugins Run in the same Erlang processWednesday, October 24, 12
  59. ACHTUNG! • Plugins Run in the same Erlang process • They may crash your brokerWednesday, October 24, 12
  60. Have Fun and Experiment!Wednesday, October 24, 12
  61. Questions?Wednesday, October 24, 12
  62. Thanks! Álvaro Videla http://twitter.com/old_sound http://github.com/videlalvaro http://www.slideshare.net/old_soundWednesday, October 24, 12

×