{"action":"created","comment":{"url":"https://api.github.com/repos/opsschool/curriculum/pulls/comments/35506128","id":35506128,"diff_hunk":"@@ -1,11 +1,114 @@\n Application Components 201\n **************************\n \n+Message Queue Systems\n+======================\n+In a distributed system a Message Queue Systems can provide a basic infrastructure to higher level functions like\n+\n+ * decoupling processes or hosts from each other\n+ * parallel processes execution\n+ * distribute events and information like changes to data, entries from logfiles and statistics for monitoring and notification\n+ * data-streaming and file-transfers to multiple hosts via multicast and unicast\n+ * replace polling mechanism with an event orientated system\n+ * network wide accessible job queues\n+ * message rerouting on failure / escalation schemes\n+ * verification of results ( best of three )\n+ * asynchronous remote procedure calls\n+ * network wide mutex\n+ * network or distributed system wide message bus\n+\n+Message Queue Systems are more alike peer2peer networks then client-server applications.\n+They can be split up into message brokers and routers or brokerless message queuing systems. [0MQ]_\n+A message as understood by the system is everything that can be represented as a bytestream.\n+Properties like type and timestamp may are added to message. [Bok]_\n+\n+.. [Bok] http://sardes.inrialpes.fr/papers/files/Bouchenak08a.pdf\n+.. [0MQ] https://en.wikipedia.org/wiki/%C3%98MQ\n+\n+\n+Further Readings\n+----------------\n+\n+ * http://c2.com/cgi/wiki?MessageQueuingArchitectures\n+ * https://en.wikipedia.org/wiki/Message-oriented_middleware and https://en.wikipedia.org/wiki/Message_oriented_middleware\n+ * https://en.wikipedia.org/wiki/Queueing_theory\n+ * https://en.wikipedia.org/wiki/Message_queue\n+ * http://www.slideshare.net/mwillbanks/art-of-message-queues\n+\n Message Brokers\n ===============\n+Message brokers represent a message queue systems that relies on a central system to route messages to its destination.\n+Messages are send to exchanges and received from queues.\n+Queues resists on the broker, also some protocols implement a client site queue for multipart transactions and prefetching.\n+Message Brokers tend to become a critical system in an otherwise distributed environment.\n+\n \n RabbitMQ\n --------\n+RabbitMQ_ is an open source Message Broker written in erlang.\n+Its queuing protocol is the Advance Message Queuing Protocol. [wiki]_  [specs]_ \n+It provides plugins for different queuing protocols like STOMP and advanced setups.\n+Installations scale from single host as an applicationmessagebus, to multi cluster installations in different networks.\n+Messages are send to different type of exchanges.\n+While Direct, Fanout, Topic and Header Exchanges are part of the core system, others plugins are rooted in the community. \n+No prior understanding of the erlang programming language is needed to setup, configure and operate the message broker.\n+The documentation on the projects homepage reads a fair amount of different configurations with explanations.\n+\n+To setup a cluster a minimum of two nodes is required.\n+All nodes of a cluster must be in the same ip network segment.\n+It is possible to send huge messages via AMQP to a RabbitMQ node.\n+The maximum message size is limited by the amount of available RAM on the node.\n+Depending on the durability of a message and the policy of queues, the messages are synchronized to other nodes.\n+A disc-node ensures a message is stored to a disc before delivering.\n+Memory based nodes provide a much higher message throughput.\n+To establish an encrypted communication between nodes, IPSec or TLS can be used.\n+Authentication is possible via an internal database, LDAP, SASL and PKI client certificates.\n+With a PKI in place consumers and publisher can share the same authorization.\n+No preshared password among all processes is needed, but different private keys are mandatory.\n+This is accomplished by using the commonname of the dn in the x509 client certificate as  username.\n+Different applications can be separated by the concept of virtual hosts in a similar way the Apache web server does.\n+Configuration is provided by webGUI or commandline tools.\n+Programming libraries and tools for a wide range of environments are available.\n+\n+The installation from the Debian repository leads to a configuration with a single host.\n+Similar installation instructions are provided for Windows, Solaris and other operation systems.\n+\n+.. code-block:: bash\n+\n+  curl 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc' | sudo apt-key add -\n+  echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/sources.d/rabbitmq.list\n+  sudo apt-get update\n+  sudo apt-get upgrade\n+  sudo apt-get install rabbitmq-server\n+\n+To backup and restore configuration data the management plugin should be configured.\n+\n+.. code-block:: none\n+\n+  { rabbitmq_management, [\n+      {  listener, [ { port, 15672 },\n+                     { ssl, true },\n+                     { ssl_opts, [ { cacertfile, \"/etc/ssl/certs/cacert.crt\" },\n+                                   { certfile,   \"/etc/ssl/certs/node1.crt\" },\n+                                   { keyfile,    \"/etc/ssl/private/node1.key\" } ]}\n+                   ]} // configured listener\n+  ]} // configured rabbitmq_management\n+  ]. // EOC\n+\n+.. code-block:: console\n+\n+  rabbitmqadmin export rabbit.config\n+  rabbitmqadmin -q import rabbit.config\n+\n+Show a detailed report about queues, users and connections\n+\n+.. code-block:: console\n+\n+  rabbitmqctrl report","path":"application_components_201.rst","position":107,"original_position":107,"commit_id":"3589290855ff2d02af7fdfdadff176b0aec4485a","original_commit_id":"3589290855ff2d02af7fdfdadff176b0aec4485a","user":{"login":"adrianmoisey","id":736329,"avatar_url":"https://avatars.githubusercontent.com/u/736329?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianmoisey","html_url":"https://github.com/adrianmoisey","followers_url":"https://api.github.com/users/adrianmoisey/followers","following_url":"https://api.github.com/users/adrianmoisey/following{/other_user}","gists_url":"https://api.github.com/users/adrianmoisey/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianmoisey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianmoisey/subscriptions","organizations_url":"https://api.github.com/users/adrianmoisey/orgs","repos_url":"https://api.github.com/users/adrianmoisey/repos","events_url":"https://api.github.com/users/adrianmoisey/events{/privacy}","received_events_url":"https://api.github.com/users/adrianmoisey/received_events","type":"User","site_admin":false},"body":"I think this should be `rabbitmqctl`?\r\n(https://www.rabbitmq.com/man/rabbitmqctl.1.man.html)","created_at":"2015-07-27T05:14:48Z","updated_at":"2015-07-27T05:14:48Z","html_url":"https://github.com/opsschool/curriculum/pull/277#discussion_r35506128","pull_request_url":"https://api.github.com/repos/opsschool/curriculum/pulls/277","_links":{"self":{"href":"https://api.github.com/repos/opsschool/curriculum/pulls/comments/35506128"},"html":{"href":"https://github.com/opsschool/curriculum/pull/277#discussion_r35506128"},"pull_request":{"href":"https://api.github.com/repos/opsschool/curriculum/pulls/277"}}},"pull_request":{"url":"https://api.github.com/repos/opsschool/curriculum/pulls/277","id":40844591,"html_url":"https://github.com/opsschool/curriculum/pull/277","diff_url":"https://github.com/opsschool/curriculum/pull/277.diff","patch_url":"https://github.com/opsschool/curriculum/pull/277.patch","issue_url":"https://api.github.com/repos/opsschool/curriculum/issues/277","number":277,"state":"open","locked":false,"title":"Rabbitmq","user":{"login":"banduri","id":13496235,"avatar_url":"https://avatars.githubusercontent.com/u/13496235?v=3","gravatar_id":"","url":"https://api.github.com/users/banduri","html_url":"https://github.com/banduri","followers_url":"https://api.github.com/users/banduri/followers","following_url":"https://api.github.com/users/banduri/following{/other_user}","gists_url":"https://api.github.com/users/banduri/gists{/gist_id}","starred_url":"https://api.github.com/users/banduri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/banduri/subscriptions","organizations_url":"https://api.github.com/users/banduri/orgs","repos_url":"https://api.github.com/users/banduri/repos","events_url":"https://api.github.com/users/banduri/events{/privacy}","received_events_url":"https://api.github.com/users/banduri/received_events","type":"User","site_admin":false},"body":"added a section for message queue system. Filled message broker and rabbitmq sections with content. ","created_at":"2015-07-25T22:45:51Z","updated_at":"2015-07-27T05:14:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fcb91cc64024fa92a6ada4c893eb845392853e76","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opsschool/curriculum/pulls/277/commits","review_comments_url":"https://api.github.com/repos/opsschool/curriculum/pulls/277/comments","review_comment_url":"https://api.github.com/repos/opsschool/curriculum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opsschool/curriculum/issues/277/comments","statuses_url":"https://api.github.com/repos/opsschool/curriculum/statuses/3589290855ff2d02af7fdfdadff176b0aec4485a","head":{"label":"banduri:rabbitmq","ref":"rabbitmq","sha":"3589290855ff2d02af7fdfdadff176b0aec4485a","user":{"login":"banduri","id":13496235,"avatar_url":"https://avatars.githubusercontent.com/u/13496235?v=3","gravatar_id":"","url":"https://api.github.com/users/banduri","html_url":"https://github.com/banduri","followers_url":"https://api.github.com/users/banduri/followers","following_url":"https://api.github.com/users/banduri/following{/other_user}","gists_url":"https://api.github.com/users/banduri/gists{/gist_id}","starred_url":"https://api.github.com/users/banduri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/banduri/subscriptions","organizations_url":"https://api.github.com/users/banduri/orgs","repos_url":"https://api.github.com/users/banduri/repos","events_url":"https://api.github.com/users/banduri/events{/privacy}","received_events_url":"https://api.github.com/users/banduri/received_events","type":"User","site_admin":false},"repo":{"id":39682732,"name":"curriculum","full_name":"banduri/curriculum","owner":{"login":"banduri","id":13496235,"avatar_url":"https://avatars.githubusercontent.com/u/13496235?v=3","gravatar_id":"","url":"https://api.github.com/users/banduri","html_url":"https://github.com/banduri","followers_url":"https://api.github.com/users/banduri/followers","following_url":"https://api.github.com/users/banduri/following{/other_user}","gists_url":"https://api.github.com/users/banduri/gists{/gist_id}","starred_url":"https://api.github.com/users/banduri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/banduri/subscriptions","organizations_url":"https://api.github.com/users/banduri/orgs","repos_url":"https://api.github.com/users/banduri/repos","events_url":"https://api.github.com/users/banduri/events{/privacy}","received_events_url":"https://api.github.com/users/banduri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/banduri/curriculum","description":"Ops School Curriculum","fork":true,"url":"https://api.github.com/repos/banduri/curriculum","forks_url":"https://api.github.com/repos/banduri/curriculum/forks","keys_url":"https://api.github.com/repos/banduri/curriculum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/banduri/curriculum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/banduri/curriculum/teams","hooks_url":"https://api.github.com/repos/banduri/curriculum/hooks","issue_events_url":"https://api.github.com/repos/banduri/curriculum/issues/events{/number}","events_url":"https://api.github.com/repos/banduri/curriculum/events","assignees_url":"https://api.github.com/repos/banduri/curriculum/assignees{/user}","branches_url":"https://api.github.com/repos/banduri/curriculum/branches{/branch}","tags_url":"https://api.github.com/repos/banduri/curriculum/tags","blobs_url":"https://api.github.com/repos/banduri/curriculum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/banduri/curriculum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/banduri/curriculum/git/refs{/sha}","trees_url":"https://api.github.com/repos/banduri/curriculum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/banduri/curriculum/statuses/{sha}","languages_url":"https://api.github.com/repos/banduri/curriculum/languages","stargazers_url":"https://api.github.com/repos/banduri/curriculum/stargazers","contributors_url":"https://api.github.com/repos/banduri/curriculum/contributors","subscribers_url":"https://api.github.com/repos/banduri/curriculum/subscribers","subscription_url":"https://api.github.com/repos/banduri/curriculum/subscription","commits_url":"https://api.github.com/repos/banduri/curriculum/commits{/sha}","git_commits_url":"https://api.github.com/repos/banduri/curriculum/git/commits{/sha}","comments_url":"https://api.github.com/repos/banduri/curriculum/comments{/number}","issue_comment_url":"https://api.github.com/repos/banduri/curriculum/issues/comments{/number}","contents_url":"https://api.github.com/repos/banduri/curriculum/contents/{+path}","compare_url":"https://api.github.com/repos/banduri/curriculum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/banduri/curriculum/merges","archive_url":"https://api.github.com/repos/banduri/curriculum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/banduri/curriculum/downloads","issues_url":"https://api.github.com/repos/banduri/curriculum/issues{/number}","pulls_url":"https://api.github.com/repos/banduri/curriculum/pulls{/number}","milestones_url":"https://api.github.com/repos/banduri/curriculum/milestones{/number}","notifications_url":"https://api.github.com/repos/banduri/curriculum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/banduri/curriculum/labels{/name}","releases_url":"https://api.github.com/repos/banduri/curriculum/releases{/id}","created_at":"2015-07-25T11:53:36Z","updated_at":"2015-07-25T11:53:37Z","pushed_at":"2015-07-25T22:44:18Z","git_url":"git://github.com/banduri/curriculum.git","ssh_url":"git@github.com:banduri/curriculum.git","clone_url":"https://github.com/banduri/curriculum.git","svn_url":"https://github.com/banduri/curriculum","homepage":"http://www.opsschool.org/","size":1186,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opsschool:master","ref":"master","sha":"a08886eb23b9b6df5167860e39ef4e49e3f5664e","user":{"login":"opsschool","id":2544993,"avatar_url":"https://avatars.githubusercontent.com/u/2544993?v=3","gravatar_id":"","url":"https://api.github.com/users/opsschool","html_url":"https://github.com/opsschool","followers_url":"https://api.github.com/users/opsschool/followers","following_url":"https://api.github.com/users/opsschool/following{/other_user}","gists_url":"https://api.github.com/users/opsschool/gists{/gist_id}","starred_url":"https://api.github.com/users/opsschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opsschool/subscriptions","organizations_url":"https://api.github.com/users/opsschool/orgs","repos_url":"https://api.github.com/users/opsschool/repos","events_url":"https://api.github.com/users/opsschool/events{/privacy}","received_events_url":"https://api.github.com/users/opsschool/received_events","type":"Organization","site_admin":false},"repo":{"id":6190554,"name":"curriculum","full_name":"opsschool/curriculum","owner":{"login":"opsschool","id":2544993,"avatar_url":"https://avatars.githubusercontent.com/u/2544993?v=3","gravatar_id":"","url":"https://api.github.com/users/opsschool","html_url":"https://github.com/opsschool","followers_url":"https://api.github.com/users/opsschool/followers","following_url":"https://api.github.com/users/opsschool/following{/other_user}","gists_url":"https://api.github.com/users/opsschool/gists{/gist_id}","starred_url":"https://api.github.com/users/opsschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opsschool/subscriptions","organizations_url":"https://api.github.com/users/opsschool/orgs","repos_url":"https://api.github.com/users/opsschool/repos","events_url":"https://api.github.com/users/opsschool/events{/privacy}","received_events_url":"https://api.github.com/users/opsschool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opsschool/curriculum","description":"Ops School Curriculum","fork":false,"url":"https://api.github.com/repos/opsschool/curriculum","forks_url":"https://api.github.com/repos/opsschool/curriculum/forks","keys_url":"https://api.github.com/repos/opsschool/curriculum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opsschool/curriculum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opsschool/curriculum/teams","hooks_url":"https://api.github.com/repos/opsschool/curriculum/hooks","issue_events_url":"https://api.github.com/repos/opsschool/curriculum/issues/events{/number}","events_url":"https://api.github.com/repos/opsschool/curriculum/events","assignees_url":"https://api.github.com/repos/opsschool/curriculum/assignees{/user}","branches_url":"https://api.github.com/repos/opsschool/curriculum/branches{/branch}","tags_url":"https://api.github.com/repos/opsschool/curriculum/tags","blobs_url":"https://api.github.com/repos/opsschool/curriculum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opsschool/curriculum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opsschool/curriculum/git/refs{/sha}","trees_url":"https://api.github.com/repos/opsschool/curriculum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opsschool/curriculum/statuses/{sha}","languages_url":"https://api.github.com/repos/opsschool/curriculum/languages","stargazers_url":"https://api.github.com/repos/opsschool/curriculum/stargazers","contributors_url":"https://api.github.com/repos/opsschool/curriculum/contributors","subscribers_url":"https://api.github.com/repos/opsschool/curriculum/subscribers","subscription_url":"https://api.github.com/repos/opsschool/curriculum/subscription","commits_url":"https://api.github.com/repos/opsschool/curriculum/commits{/sha}","git_commits_url":"https://api.github.com/repos/opsschool/curriculum/git/commits{/sha}","comments_url":"https://api.github.com/repos/opsschool/curriculum/comments{/number}","issue_comment_url":"https://api.github.com/repos/opsschool/curriculum/issues/comments{/number}","contents_url":"https://api.github.com/repos/opsschool/curriculum/contents/{+path}","compare_url":"https://api.github.com/repos/opsschool/curriculum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opsschool/curriculum/merges","archive_url":"https://api.github.com/repos/opsschool/curriculum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opsschool/curriculum/downloads","issues_url":"https://api.github.com/repos/opsschool/curriculum/issues{/number}","pulls_url":"https://api.github.com/repos/opsschool/curriculum/pulls{/number}","milestones_url":"https://api.github.com/repos/opsschool/curriculum/milestones{/number}","notifications_url":"https://api.github.com/repos/opsschool/curriculum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opsschool/curriculum/labels{/name}","releases_url":"https://api.github.com/repos/opsschool/curriculum/releases{/id}","created_at":"2012-10-12T13:27:34Z","updated_at":"2015-07-18T23:05:34Z","pushed_at":"2015-07-25T22:45:52Z","git_url":"git://github.com/opsschool/curriculum.git","ssh_url":"git@github.com:opsschool/curriculum.git","clone_url":"https://github.com/opsschool/curriculum.git","svn_url":"https://github.com/opsschool/curriculum","homepage":"http://www.opsschool.org/","size":3926,"stargazers_count":817,"watchers_count":817,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":314,"mirror_url":null,"open_issues_count":24,"forks":314,"open_issues":24,"watchers":817,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opsschool/curriculum/pulls/277"},"html":{"href":"https://github.com/opsschool/curriculum/pull/277"},"issue":{"href":"https://api.github.com/repos/opsschool/curriculum/issues/277"},"comments":{"href":"https://api.github.com/repos/opsschool/curriculum/issues/277/comments"},"review_comments":{"href":"https://api.github.com/repos/opsschool/curriculum/pulls/277/comments"},"review_comment":{"href":"https://api.github.com/repos/opsschool/curriculum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opsschool/curriculum/pulls/277/commits"},"statuses":{"href":"https://api.github.com/repos/opsschool/curriculum/statuses/3589290855ff2d02af7fdfdadff176b0aec4485a"}}}}