RabbitMQ

3,982
-1

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,982
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
67
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

RabbitMQ

  1. 1. Understanding RabbitMQ Internals 2009-07-03 Accense Technology, Inc. Ryosuke NAKAI
  2. 2. Agenda Introduction AMQP? RabbitMQ? Understanding RabbitMQ Internals Q&A
  3. 3. Introduction Erlang/2, Python/7, Mac/3, VIM/4 XMPP, AMQP, SIP, HTTP, WebSockets RADIUS, DNS, DHCP
  4. 4. AMQP?
  5. 5. http://www.rabbit...
  6. 6. RabbitMQ? LShift AMQP RabbitMQ CEO Twitter/mail (OpenSource) Erlang Mozilla Public License Erlang c_src
  7. 7. RabbitHub PubSub-over-Webhooks with RabbitHub MochiWeb http://code.google.com/p/pubsubhubbub/ http://github.com/tonyg/rabbithub/tree/master
  8. 8. Understanding RabbitMQ Internals AMQP ... Erlang ...
  9. 9. tcp_listener.erl, tcp_acceptor.erl prim_inet:async_accept tcp_listener_sup.erl, tcp_acceptor_sup.erl one_for_all simple_one_for_one gen_server2, priority_queue pcall, pcast priority_queue:new, priority_queue:in/out
  10. 10. rabbit_log.erl error_logger gen_server rabbit_control.erl init:get_plain_arguments rabbit_tests.erl rabbit_error_logger.erl gen_event
  11. 11. tcp_listener, tcp_acceptor prim_inet:async_accept gen_server gen_server gen_tcp:accept (OTP ) mochiweb, Kai proc_lib RabbitMQ prim_inet:async_accept
  12. 12. !"#$%&'!()(*$'+# '+#(*,&'-* -)($1-*$.%% -)($1-*$.%% !"#$%&'!()(* !"#$.""(#!-*$'+# /-*0(* '+#(*,&'-* '&2#%($-)($1-*$-)( !"#$.""(#!-* /-*0(*
  13. 13. one_for_all tcp_listener LSock tcp_listener tcp_acceptor tcp_acceptor supervisor:start_child
  14. 14. simple_one_for_one one_for_one supervisor:append_child ChildSpec ListenSocket start_child supervisor:start_child(tcp_acceptor_sup, [LSock]) module, function, [Arg1, Arg2] ++ [LSock]
  15. 15. tcp_listener:init
  16. 16. rabbit_control.erl erl -extra init:get_plain_arguments() -s module function arg1 arg2 arg3 ... default function ... start -noinput, -hidden, -sname(MUST DNS) erlang:list_to_atom(Commnad) ...(add_user, Node, ...)
  17. 17. fun(I) when .. -> ... (I) when ... case A of _ when is_record(B) -> ; _ when is_integer(C) -> ; ... .
  18. 18. Info, Key, Value
  19. 19. rabbit_log gen_server handle_cast log error_logger info_msg, warning_msg, error_msg format, args
  20. 20. rabbit_tests common_test EUnit test_topic_matching passed = test_topic_match(“#”, “test.test”) passed = test_topic_match(“#.test”, “test”) Cluster Log
  21. 21. gen_server2 & priority_queue gen_server2:pcall/3, pcall/4, pcast/3 pcall(Name, Priority, Request) pcall(Name, Priority, Request, Timeout) pcast({Name, Node}, Priority, Request) call/cast
  22. 22. gen_server2 gen_server call cast gen_server2 priority_queue priority
  23. 23. priority_queue Queue = priority_queue:new(). priority_queue:in(X, 5, Queue). Queue priority_queue:out(Queue)
  24. 24. rabbit_error_logger gen_event gen_event:add_handler Exchange -define(LOG_EXCH_NAME, <<"amq.rabbitmq.log">>). topic
  25. 25. http://blogs.iona.com/essence/2007/05/ amqpfaq.html http://www.infoq.com/jp/news/2008/08/amqp- progress http://www.lshift.net/clients.html http://www.rabbitmq.com/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×