• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
RabbitMQ
 

RabbitMQ

on

  • 5,543 views

 

Statistics

Views

Total Views
5,543
Views on SlideShare
5,531
Embed Views
12

Actions

Likes
2
Downloads
62
Comments
0

1 Embed 12

http://www.slideshare.net 12

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    RabbitMQ RabbitMQ Presentation Transcript

    • Understanding RabbitMQ Internals 2009-07-03 Accense Technology, Inc. Ryosuke NAKAI
    • Agenda Introduction AMQP? RabbitMQ? Understanding RabbitMQ Internals Q&A
    • Introduction Erlang/2, Python/7, Mac/3, VIM/4 XMPP, AMQP, SIP, HTTP, WebSockets RADIUS, DNS, DHCP
    • AMQP?
    • http://www.rabbit...
    • RabbitMQ? LShift AMQP RabbitMQ CEO Twitter/mail (OpenSource) Erlang Mozilla Public License Erlang c_src
    • RabbitHub PubSub-over-Webhooks with RabbitHub MochiWeb http://code.google.com/p/pubsubhubbub/ http://github.com/tonyg/rabbithub/tree/master
    • Understanding RabbitMQ Internals AMQP ... Erlang ...
    • 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
    • rabbit_log.erl error_logger gen_server rabbit_control.erl init:get_plain_arguments rabbit_tests.erl rabbit_error_logger.erl gen_event
    • 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
    • !"#$%&'!()(*$'+# '+#(*,&'-* -)($1-*$.%% -)($1-*$.%% !"#$%&'!()(* !"#$.""(#!-*$'+# /-*0(* '+#(*,&'-* '&2#%($-)($1-*$-)( !"#$.""(#!-* /-*0(*
    • one_for_all tcp_listener LSock tcp_listener tcp_acceptor tcp_acceptor supervisor:start_child
    • 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]
    • tcp_listener:init
    • 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, ...)
    • fun(I) when .. -> ... (I) when ... case A of _ when is_record(B) -> ; _ when is_integer(C) -> ; ... .
    • Info, Key, Value
    • rabbit_log gen_server handle_cast log error_logger info_msg, warning_msg, error_msg format, args
    • rabbit_tests common_test EUnit test_topic_matching passed = test_topic_match(“#”, “test.test”) passed = test_topic_match(“#.test”, “test”) Cluster Log
    • 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
    • gen_server2 gen_server call cast gen_server2 priority_queue priority
    • priority_queue Queue = priority_queue:new(). priority_queue:in(X, 5, Queue). Queue priority_queue:out(Queue)
    • rabbit_error_logger gen_event gen_event:add_handler Exchange -define(LOG_EXCH_NAME, <<"amq.rabbitmq.log">>). topic
    • 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/