aboutsummaryrefslogtreecommitdiffstats
path: root/protocol.html
diff options
context:
space:
mode:
authorjason2015-11-17 18:26:55 -0700
committerjason2015-11-17 18:26:55 -0700
commite40a1ba5847dfbe27c8bb61ae8562bfea4581ed8 (patch)
tree7208b3c76de18891e6d017fe6d242aea3e037aad /protocol.html
parent8835c6ae240ec7a08e6e1b345927c9c7a62a0b6b (diff)
downloadeventmq-e40a1ba5847dfbe27c8bb61ae8562bfea4581ed8.tar.gz
eventmq-e40a1ba5847dfbe27c8bb61ae8562bfea4581ed8.zip
documentation update
Diffstat (limited to 'protocol.html')
-rw-r--r--protocol.html307
1 files changed, 307 insertions, 0 deletions
diff --git a/protocol.html b/protocol.html
new file mode 100644
index 0000000..196bb80
--- /dev/null
+++ b/protocol.html
@@ -0,0 +1,307 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
9 <title>EventMQ Protocol Specification &mdash; EventMQ 0 documentation</title>
10
11 <link rel="stylesheet" href="_static/classic.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',
17 VERSION: '0',
18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true
21 };
22 </script>
23 <script type="text/javascript" src="_static/jquery.js"></script>
24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="top" title="EventMQ 0 documentation" href="index.html" />
27 </head>
28 <body role="document">
29 <div class="related" role="navigation" aria-label="related navigation">
30 <h3>Navigation</h3>
31 <ul>
32 <li class="right" style="margin-right: 10px">
33 <a href="genindex.html" title="General Index"
34 accesskey="I">index</a></li>
35 <li class="right" >
36 <a href="py-modindex.html" title="Python Module Index"
37 >modules</a> |</li>
38 <li class="nav-item nav-item-0"><a href="index.html">EventMQ 0 documentation</a> &raquo;</li>
39 </ul>
40 </div>
41
42 <div class="document">
43 <div class="documentwrapper">
44 <div class="bodywrapper">
45 <div class="body" role="main">
46
47 <div class="section" id="eventmq-protocol-specification">
48<h1>EventMQ Protocol Specification<a class="headerlink" href="#eventmq-protocol-specification" title="Permalink to this headline">¶</a></h1>
49<p><em>The status of this document is alpha and subject to heavy change</em></p>
50</div>
51<div class="section" id="goals">
52<h1>Goals<a class="headerlink" href="#goals" title="Permalink to this headline">¶</a></h1>
53<p>The EventMQ Protocol (eMQP) defines a reliable service-oriented request-reply and pub-sub dialog between a set of clients, a broker, and a set of workers. This goal is to</p>
54<p>The goals are to:</p>
55<blockquote>
56<div><ul class="simple">
57<li>Specify a protocol to follow when implementing a component to EventMQ.</li>
58<li>Allow requests to be routed to workers by an abstracted service name.</li>
59<li>Detect disconnected peers through heartbeating.</li>
60<li>Allow for message tracing and debugging.</li>
61</ul>
62</div></blockquote>
63</div>
64<div class="section" id="license">
65<h1>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h1>
66<p>This Specification is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
67<p>This Specification is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
68</div>
69<div class="section" id="language">
70<h1>Language<a class="headerlink" href="#language" title="Permalink to this headline">¶</a></h1>
71<p>The key words &#8220;MUST&#8221;, &#8220;MUST NOT&#8221;, &#8220;REQUIRED&#8221;, &#8220;SHALL&#8221;, &#8220;SHALL NOT&#8221;, &#8220;SHOULD&#8221;, &#8220;SHOULD NOT&#8221;, &#8220;RECOMMENDED&#8221;, &#8220;MAY&#8221;, and &#8220;OPTIONAL&#8221; in this document are to be interpreted as described in RFC 2119[[1](<a class="reference external" href="http://tools.ietf.org/html/rfc2119">http://tools.ietf.org/html/rfc2119</a>)].</p>
72</div>
73<div class="section" id="architecture">
74<h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline">¶</a></h1>
75<p>insert pretty picture here</p>
76<div class="section" id="topology">
77<h2>Topology<a class="headerlink" href="#topology" title="Permalink to this headline">¶</a></h2>
78<p>eMQP connects a set of client applications (e.g. web servers), a broker, and a pool of workers. Clients connect to the broker as well as the workers.</p>
79<p>&#8216;Clients&#8217; is defined as application issuing requests and &#8216;workers&#8217; as applications that process these requests. (Workers consist of a <cite>JobManager</cite> and a pool of <cite>Worker</cite> resources where the job executes.)</p>
80<p>The EventMQ broker handles a set of named queues. The broker SHOULD serve clients on a fair request and MAY deliver requests to workers on any basis, including 0MQ&#8217;s built-in round robin or least-recently used.</p>
81</div>
82<div class="section" id="router-addressing">
83<h2>ROUTER Addressing<a class="headerlink" href="#router-addressing" title="Permalink to this headline">¶</a></h2>
84<p>In the case of request-reply, the broker MUST use a ROUTER socket to accept requests from both clients and workers. The broker MAY use a seperate socket implementing a subset of eMQP, or MAY use a single socket implementing all of eMQP.</p>
85<p>From the 0MQ manual[[2](<a class="reference external" href="http://api.zeromq.org/master:zmq-socket">http://api.zeromq.org/master:zmq-socket</a>)]
86&gt; When receiving messages a ROUTER socket shall prepend a message part containing the identity of the originating peer to the message before passing it to the application. When sending messages a ROUTER socket shall remove the first part of the message and use it to determine the identity of the peer the message shall be routed to.</p>
87<p>This extra frame is not shown in the specifications below.</p>
88</div>
89<div class="section" id="emqp-client">
90<h2>eMQP / Client<a class="headerlink" href="#emqp-client" title="Permalink to this headline">¶</a></h2>
91<p>A <strong>REQUEST</strong> command consists of 7-frame multipart message, formatted as follows.</p>
92<table border="1" class="docutils">
93<colgroup>
94<col width="10%" />
95<col width="22%" />
96<col width="68%" />
97</colgroup>
98<thead valign="bottom">
99<tr class="row-odd"><th class="head">FRAME</th>
100<th class="head">Value</th>
101<th class="head">Description</th>
102</tr>
103</thead>
104<tbody valign="top">
105<tr class="row-even"><td>0</td>
106<td>_EMPTY_</td>
107<td>leave empty</td>
108</tr>
109<tr class="row-odd"><td>1</td>
110<td>eMQP/1.0</td>
111<td>Protocol version</td>
112</tr>
113<tr class="row-even"><td>2</td>
114<td>READY</td>
115<td>Command</td>
116</tr>
117<tr class="row-odd"><td>3</td>
118<td>_MSGID_</td>
119<td>A unique id for the msg</td>
120</tr>
121<tr class="row-even"><td>4</td>
122<td>_QUEUE_NAME_</td>
123<td>the name of the queue the worker belongs to</td>
124</tr>
125<tr class="row-odd"><td>5</td>
126<td>_HEADERS_</td>
127<td>dictionary of headers. can be an empty set</td>
128</tr>
129<tr class="row-even"><td>6</td>
130<td>_MSG_</td>
131<td>The message to send</td>
132</tr>
133</tbody>
134</table>
135</div>
136<div class="section" id="emqp-worker">
137<h2>eMQP / Worker<a class="headerlink" href="#emqp-worker" title="Permalink to this headline">¶</a></h2>
138<p>An <strong>INFORM</strong> command consists of a 5-frame multipart message, formatted as follows.</p>
139<table border="1" class="docutils">
140<colgroup>
141<col width="10%" />
142<col width="22%" />
143<col width="68%" />
144</colgroup>
145<thead valign="bottom">
146<tr class="row-odd"><th class="head">FRAME</th>
147<th class="head">Value</th>
148<th class="head">Description</th>
149</tr>
150</thead>
151<tbody valign="top">
152<tr class="row-even"><td>0</td>
153<td>_EMPTY_</td>
154<td>leave empty</td>
155</tr>
156<tr class="row-odd"><td>1</td>
157<td>eMQP/1.0</td>
158<td>Protocol version</td>
159</tr>
160<tr class="row-even"><td>2</td>
161<td>INFORM</td>
162<td>&nbsp;</td>
163</tr>
164<tr class="row-odd"><td>3</td>
165<td>_MSGID_</td>
166<td>A unique id for the msg</td>
167</tr>
168<tr class="row-even"><td>4</td>
169<td>_QUEUE_NAME_</td>
170<td>the name of the queue the worker belongs to</td>
171</tr>
172</tbody>
173</table>
174<p>A <strong>READY</strong> frame consists of a 4-frame multipart message, formatted as follows.</p>
175<table border="1" class="docutils">
176<colgroup>
177<col width="14%" />
178<col width="33%" />
179<col width="53%" />
180</colgroup>
181<thead valign="bottom">
182<tr class="row-odd"><th class="head">FRAME</th>
183<th class="head">Value</th>
184<th class="head">Description</th>
185</tr>
186</thead>
187<tbody valign="top">
188<tr class="row-even"><td>0</td>
189<td>_EMPTY_</td>
190<td>leave empty</td>
191</tr>
192<tr class="row-odd"><td>1</td>
193<td>eMQP/1.0</td>
194<td>Protocol version</td>
195</tr>
196<tr class="row-even"><td>2</td>
197<td>READY</td>
198<td>&nbsp;</td>
199</tr>
200<tr class="row-odd"><td>3</td>
201<td>_MSGID_</td>
202<td>A unique id for the msg</td>
203</tr>
204</tbody>
205</table>
206<p>A <strong>REPLY</strong> frame consists of a 5-frame multipart message, formatted as follows.</p>
207<table border="1" class="docutils">
208<colgroup>
209<col width="13%" />
210<col width="31%" />
211<col width="56%" />
212</colgroup>
213<thead valign="bottom">
214<tr class="row-odd"><th class="head">FRAME</th>
215<th class="head">Value</th>
216<th class="head">Description</th>
217</tr>
218</thead>
219<tbody valign="top">
220<tr class="row-even"><td>0</td>
221<td>_EMPTY_</td>
222<td>leave empty</td>
223</tr>
224<tr class="row-odd"><td>1</td>
225<td>eMQP/1.0</td>
226<td>Protocol version</td>
227</tr>
228<tr class="row-even"><td>2</td>
229<td>REPLY</td>
230<td>&nbsp;</td>
231</tr>
232<tr class="row-odd"><td>3</td>
233<td>_MSGID_</td>
234<td>A unique id for the msg</td>
235</tr>
236<tr class="row-even"><td>4</td>
237<td>_MSG_</td>
238<td>The reply to respond with</td>
239</tr>
240</tbody>
241</table>
242</div>
243</div>
244
245
246 </div>
247 </div>
248 </div>
249 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
250 <div class="sphinxsidebarwrapper">
251 <h3><a href="index.html">Table Of Contents</a></h3>
252 <ul>
253<li><a class="reference internal" href="#">EventMQ Protocol Specification</a></li>
254<li><a class="reference internal" href="#goals">Goals</a></li>
255<li><a class="reference internal" href="#license">License</a></li>
256<li><a class="reference internal" href="#language">Language</a></li>
257<li><a class="reference internal" href="#architecture">Architecture</a><ul>
258<li><a class="reference internal" href="#topology">Topology</a></li>
259<li><a class="reference internal" href="#router-addressing">ROUTER Addressing</a></li>
260<li><a class="reference internal" href="#emqp-client">eMQP / Client</a></li>
261<li><a class="reference internal" href="#emqp-worker">eMQP / Worker</a></li>
262</ul>
263</li>
264</ul>
265
266 <div role="note" aria-label="source link">
267 <h3>This Page</h3>
268 <ul class="this-page-menu">
269 <li><a href="_sources/protocol.txt"
270 rel="nofollow">Show Source</a></li>
271 </ul>
272 </div>
273<div id="searchbox" style="display: none" role="search">
274 <h3>Quick search</h3>
275 <form class="search" action="search.html" method="get">
276 <input type="text" name="q" />
277 <input type="submit" value="Go" />
278 <input type="hidden" name="check_keywords" value="yes" />
279 <input type="hidden" name="area" value="default" />
280 </form>
281 <p class="searchtip" style="font-size: 90%">
282 Enter search terms or a module, class or function name.
283 </p>
284</div>
285<script type="text/javascript">$('#searchbox').show(0);</script>
286 </div>
287 </div>
288 <div class="clearer"></div>
289 </div>
290 <div class="related" role="navigation" aria-label="related navigation">
291 <h3>Navigation</h3>
292 <ul>
293 <li class="right" style="margin-right: 10px">
294 <a href="genindex.html" title="General Index"
295 >index</a></li>
296 <li class="right" >
297 <a href="py-modindex.html" title="Python Module Index"
298 >modules</a> |</li>
299 <li class="nav-item nav-item-0"><a href="index.html">EventMQ 0 documentation</a> &raquo;</li>
300 </ul>
301 </div>
302 <div class="footer" role="contentinfo">
303 &copy; Copyright 2015, eventboard.io.
304 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
305 </div>
306 </body>
307</html> \ No newline at end of file