aboutsummaryrefslogtreecommitdiffstats
path: root/protocol.html
diff options
context:
space:
mode:
authorjason2016-01-22 16:13:14 -0700
committerjason2016-01-22 16:13:14 -0700
commit3b4c07b188d1530be556b51eacae99b97ef0e9ff (patch)
treef718b280ec66d0582cf5125dbeaf93888a935160 /protocol.html
parente37b3e9b8889d539bf943eb76b8d02f18d645b01 (diff)
downloadeventmq-3b4c07b188d1530be556b51eacae99b97ef0e9ff.tar.gz
eventmq-3b4c07b188d1530be556b51eacae99b97ef0e9ff.zip
updates for docs
Diffstat (limited to 'protocol.html')
-rw-r--r--protocol.html204
1 files changed, 170 insertions, 34 deletions
diff --git a/protocol.html b/protocol.html
index 1aff716..221bae0 100644
--- a/protocol.html
+++ b/protocol.html
@@ -8,7 +8,7 @@
8 8
9 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 9 <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 10
11 <title>EventMQ Protocol Specification &mdash; EventMQ 0 documentation</title> 11 <title>Goals &mdash; EventMQ 0 documentation</title>
12 12
13 13
14 14
@@ -84,20 +84,18 @@
84 <ul class="current"> 84 <ul class="current">
85<li class="toctree-l1"><a class="reference internal" href="api.html">API Documentation</a></li> 85<li class="toctree-l1"><a class="reference internal" href="api.html">API Documentation</a></li>
86<li class="toctree-l1 current"><a class="reference internal" href="contributing.html">Contributing to EventMQ</a><ul class="current"> 86<li class="toctree-l1 current"><a class="reference internal" href="contributing.html">Contributing to EventMQ</a><ul class="current">
87<li class="toctree-l2 current"><a class="current reference internal" href="">EventMQ Protocol Specification</a><ul> 87<li class="toctree-l2 current"><a class="current reference internal" href="">Goals</a></li>
88<li class="toctree-l3"><a class="reference internal" href="#goals">Goals</a></li> 88<li class="toctree-l2"><a class="reference internal" href="#license">License</a></li>
89<li class="toctree-l3"><a class="reference internal" href="#license">License</a></li> 89<li class="toctree-l2"><a class="reference internal" href="#language">Language</a></li>
90<li class="toctree-l3"><a class="reference internal" href="#language">Language</a></li> 90<li class="toctree-l2"><a class="reference internal" href="#architecture">Architecture</a><ul>
91<li class="toctree-l3"><a class="reference internal" href="#architecture">Architecture</a><ul> 91<li class="toctree-l3"><a class="reference internal" href="#topology">Topology</a></li>
92<li class="toctree-l4"><a class="reference internal" href="#topology">Topology</a></li> 92<li class="toctree-l3"><a class="reference internal" href="#router-addressing">ROUTER Addressing</a></li>
93<li class="toctree-l4"><a class="reference internal" href="#router-addressing">ROUTER Addressing</a></li> 93<li class="toctree-l3"><a class="reference internal" href="#global-frames">Global Frames</a></li>
94<li class="toctree-l4"><a class="reference internal" href="#global-frames">Global Frames</a></li> 94<li class="toctree-l3"><a class="reference internal" href="#emqp-client">eMQP / Client</a></li>
95<li class="toctree-l4"><a class="reference internal" href="#emqp-client">eMQP / Client</a></li> 95<li class="toctree-l3"><a class="reference internal" href="#emqp-scheduler">eMQP / Scheduler</a></li>
96<li class="toctree-l4"><a class="reference internal" href="#emqp-worker">eMQP / Worker</a></li> 96<li class="toctree-l3"><a class="reference internal" href="#emqp-worker">eMQP / Worker</a></li>
97<li class="toctree-l4"><a class="reference internal" href="#heartbeating">Heartbeating</a></li> 97<li class="toctree-l3"><a class="reference internal" href="#heartbeating">Heartbeating</a></li>
98<li class="toctree-l4"><a class="reference internal" href="#request-headers">Request Headers</a></li> 98<li class="toctree-l3"><a class="reference internal" href="#request-headers">REQUEST Headers</a></li>
99</ul>
100</li>
101</ul> 99</ul>
102</li> 100</li>
103<li class="toctree-l2"><a class="reference external" href="https://github.com/enderlabs/eventmq">Source Code</a></li> 101<li class="toctree-l2"><a class="reference external" href="https://github.com/enderlabs/eventmq">Source Code</a></li>
@@ -136,7 +134,7 @@
136 134
137 <li><a href="contributing.html">Contributing to EventMQ</a> &raquo;</li> 135 <li><a href="contributing.html">Contributing to EventMQ</a> &raquo;</li>
138 136
139 <li>EventMQ Protocol Specification</li> 137 <li>Goals</li>
140 <li class="wy-breadcrumbs-aside"> 138 <li class="wy-breadcrumbs-aside">
141 139
142 140
@@ -150,11 +148,12 @@
150 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> 148 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
151 <div itemprop="articleBody"> 149 <div itemprop="articleBody">
152 150
153 <div class="section" id="eventmq-protocol-specification"> 151 <p>/<strong>**************************e
154<h1>EventMQ Protocol Specification<a class="headerlink" href="#eventmq-protocol-specification" title="Permalink to this headline">¶</a></h1> 152EventMQ Protocol Specification
155<p><em>The status of this document is alpha and subject to heavy change</em></p> 153****************************</strong>
154<em>The status of this document is alpha and subject to heavy change</em></p>
156<div class="section" id="goals"> 155<div class="section" id="goals">
157<h2>Goals<a class="headerlink" href="#goals" title="Permalink to this headline">¶</a></h2> 156<h1>Goals<a class="headerlink" href="#goals" title="Permalink to this headline">¶</a></h1>
158<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> 157<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>
159<p>The goals are to:</p> 158<p>The goals are to:</p>
160<blockquote> 159<blockquote>
@@ -167,32 +166,32 @@
167</div></blockquote> 166</div></blockquote>
168</div> 167</div>
169<div class="section" id="license"> 168<div class="section" id="license">
170<h2>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h2> 169<h1>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h1>
171<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> 170<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>
172<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> 171<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>
173</div> 172</div>
174<div class="section" id="language"> 173<div class="section" id="language">
175<h2>Language<a class="headerlink" href="#language" title="Permalink to this headline">¶</a></h2> 174<h1>Language<a class="headerlink" href="#language" title="Permalink to this headline">¶</a></h1>
176<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> 175<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>
177</div> 176</div>
178<div class="section" id="architecture"> 177<div class="section" id="architecture">
179<h2>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline">¶</a></h2> 178<h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline">¶</a></h1>
180<p>insert pretty picture here</p> 179<p>insert pretty picture here</p>
181<div class="section" id="topology"> 180<div class="section" id="topology">
182<h3>Topology<a class="headerlink" href="#topology" title="Permalink to this headline">¶</a></h3> 181<h2>Topology<a class="headerlink" href="#topology" title="Permalink to this headline">¶</a></h2>
183<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> 182<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>
184<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> 183<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>
185<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> 184<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>
186</div> 185</div>
187<div class="section" id="router-addressing"> 186<div class="section" id="router-addressing">
188<h3>ROUTER Addressing<a class="headerlink" href="#router-addressing" title="Permalink to this headline">¶</a></h3> 187<h2>ROUTER Addressing<a class="headerlink" href="#router-addressing" title="Permalink to this headline">¶</a></h2>
189<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> 188<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>
190<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>)] 189<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>)]
191&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> 190&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>
192<p>This extra frame is not shown in the specifications below.</p> 191<p>This extra frame is not shown in the specifications below.</p>
193</div> 192</div>
194<div class="section" id="global-frames"> 193<div class="section" id="global-frames">
195<h3>Global Frames<a class="headerlink" href="#global-frames" title="Permalink to this headline">¶</a></h3> 194<h2>Global Frames<a class="headerlink" href="#global-frames" title="Permalink to this headline">¶</a></h2>
196<p>An <strong>ACK</strong> command consists of a 4-frame multipart message, formatted as follows.</p> 195<p>An <strong>ACK</strong> command consists of a 4-frame multipart message, formatted as follows.</p>
197<table border="1" class="docutils"> 196<table border="1" class="docutils">
198<colgroup> 197<colgroup>
@@ -231,7 +230,7 @@
231</table> 230</table>
232</div> 231</div>
233<div class="section" id="emqp-client"> 232<div class="section" id="emqp-client">
234<h3>eMQP / Client<a class="headerlink" href="#emqp-client" title="Permalink to this headline">¶</a></h3> 233<h2>eMQP / Client<a class="headerlink" href="#emqp-client" title="Permalink to this headline">¶</a></h2>
235<p>A <strong>REQUEST</strong> command consists of a 7-frame multipart message, formatted as follows.</p> 234<p>A <strong>REQUEST</strong> command consists of a 7-frame multipart message, formatted as follows.</p>
236<table border="1" class="docutils"> 235<table border="1" class="docutils">
237<colgroup> 236<colgroup>
@@ -312,7 +311,7 @@
312</tr> 311</tr>
313<tr class="row-odd"><td>5</td> 312<tr class="row-odd"><td>5</td>
314<td>_HEADERS_</td> 313<td>_HEADERS_</td>
315<td>dictionary of headers. can be an empty set</td> 314<td>csv list of headers</td>
316</tr> 315</tr>
317<tr class="row-even"><td>6</td> 316<tr class="row-even"><td>6</td>
318<td>_MSG_</td> 317<td>_MSG_</td>
@@ -320,9 +319,140 @@
320</tr> 319</tr>
321</tbody> 320</tbody>
322</table> 321</table>
322<p>A <strong>SCHEDULE</strong> command consists of a 7-frame multipart message, formatted as follows.</p>
323<table border="1" class="docutils">
324<colgroup>
325<col width="10%" />
326<col width="23%" />
327<col width="67%" />
328</colgroup>
329<thead valign="bottom">
330<tr class="row-odd"><th class="head">FRAME</th>
331<th class="head">Value</th>
332<th class="head">Description</th>
333</tr>
334</thead>
335<tbody valign="top">
336<tr class="row-even"><td>0</td>
337<td>_EMPTY_</td>
338<td>leave empty</td>
339</tr>
340<tr class="row-odd"><td>1</td>
341<td>eMQP/1.0</td>
342<td>Protocol version</td>
343</tr>
344<tr class="row-even"><td>2</td>
345<td>SCHEDULE</td>
346<td>command</td>
347</tr>
348<tr class="row-odd"><td>3</td>
349<td>_MSGID_</td>
350<td>A unique id for the msg</td>
351</tr>
352<tr class="row-even"><td>4</td>
353<td>_TOPIC_NAME_</td>
354<td>name of queue that the job should run in</td>
355</tr>
356<tr class="row-odd"><td>5</td>
357<td>_HEADERS_</td>
358<td>csv list of headers for this message</td>
359</tr>
360<tr class="row-even"><td>6</td>
361<td>_MSG_</td>
362<td>The message to send</td>
363</tr>
364</tbody>
365</table>
366<p>An <strong>UNSCHEDULE</strong> command consists of a 7-frame multipart message, formatted as follows.</p>
367<table border="1" class="docutils">
368<colgroup>
369<col width="8%" />
370<col width="20%" />
371<col width="72%" />
372</colgroup>
373<thead valign="bottom">
374<tr class="row-odd"><th class="head">FRAME</th>
375<th class="head">Value</th>
376<th class="head">Description</th>
377</tr>
378</thead>
379<tbody valign="top">
380<tr class="row-even"><td>0</td>
381<td>_EMPTY_</td>
382<td>leave empty</td>
383</tr>
384<tr class="row-odd"><td>1</td>
385<td>eMQP/1.0</td>
386<td>Protocol version</td>
387</tr>
388<tr class="row-even"><td>2</td>
389<td>UNSCHEDULE</td>
390<td>command</td>
391</tr>
392<tr class="row-odd"><td>3</td>
393<td>_MSGID_</td>
394<td>A unique id for the msg</td>
395</tr>
396<tr class="row-even"><td>4</td>
397<td>_TOPIC_NAME_</td>
398<td>ignored for this command, broadcasted to all queues</td>
399</tr>
400<tr class="row-odd"><td>5</td>
401<td>_HEADERS_</td>
402<td>csv list of headers for this message</td>
403</tr>
404<tr class="row-even"><td>6</td>
405<td>_MSG_</td>
406<td>The message to send</td>
407</tr>
408</tbody>
409</table>
410</div>
411<div class="section" id="emqp-scheduler">
412<h2>eMQP / Scheduler<a class="headerlink" href="#emqp-scheduler" title="Permalink to this headline">¶</a></h2>
413<p>An <strong>INFORM</strong> command consists of a 6-frame multipart message, formatted as follows.</p>
414<table border="1" class="docutils">
415<colgroup>
416<col width="9%" />
417<col width="20%" />
418<col width="71%" />
419</colgroup>
420<thead valign="bottom">
421<tr class="row-odd"><th class="head">FRAME</th>
422<th class="head">Value</th>
423<th class="head">Description</th>
424</tr>
425</thead>
426<tbody valign="top">
427<tr class="row-even"><td>0</td>
428<td>_EMPTY_</td>
429<td>leave empty</td>
430</tr>
431<tr class="row-odd"><td>1</td>
432<td>eMQP/1.0</td>
433<td>Protocol version</td>
434</tr>
435<tr class="row-even"><td>2</td>
436<td>INFORM</td>
437<td>command</td>
438</tr>
439<tr class="row-odd"><td>3</td>
440<td>_MSGID_</td>
441<td>A unique id for the msg</td>
442</tr>
443<tr class="row-even"><td>4</td>
444<td>_QUEUE_NAME_</td>
445<td>csv seperated names of queue the worker belongs to</td>
446</tr>
447<tr class="row-odd"><td>5</td>
448<td>scheduler</td>
449<td>type of peer connecting</td>
450</tr>
451</tbody>
452</table>
323</div> 453</div>
324<div class="section" id="emqp-worker"> 454<div class="section" id="emqp-worker">
325<h3>eMQP / Worker<a class="headerlink" href="#emqp-worker" title="Permalink to this headline">¶</a></h3> 455<h2>eMQP / Worker<a class="headerlink" href="#emqp-worker" title="Permalink to this headline">¶</a></h2>
326<p>An <strong>INFORM</strong> command consists of a 5-frame multipart message, formatted as follows.</p> 456<p>An <strong>INFORM</strong> command consists of a 5-frame multipart message, formatted as follows.</p>
327<table border="1" class="docutils"> 457<table border="1" class="docutils">
328<colgroup> 458<colgroup>
@@ -357,6 +487,10 @@
357<td>_QUEUE_NAME_</td> 487<td>_QUEUE_NAME_</td>
358<td>csv seperated names of queue the worker belongs to</td> 488<td>csv seperated names of queue the worker belongs to</td>
359</tr> 489</tr>
490<tr class="row-odd"><td>5</td>
491<td>worker</td>
492<td>type of peer connecting</td>
493</tr>
360</tbody> 494</tbody>
361</table> 495</table>
362<p>A <strong>READY</strong> frame consists of a 4-frame multipart message, formatted as follows.</p> 496<p>A <strong>READY</strong> frame consists of a 4-frame multipart message, formatted as follows.</p>
@@ -497,20 +631,23 @@
497</table> 631</table>
498</div> 632</div>
499<div class="section" id="heartbeating"> 633<div class="section" id="heartbeating">
500<h3>Heartbeating<a class="headerlink" href="#heartbeating" title="Permalink to this headline">¶</a></h3> 634<h2>Heartbeating<a class="headerlink" href="#heartbeating" title="Permalink to this headline">¶</a></h2>
501<blockquote> 635<blockquote>
502<div><ul class="simple"> 636<div><ul class="simple">
503<li>HEARTBEAT commands are valid at any time after an INFORM command</li> 637<li>HEARTBEAT commands are valid at any time after an INFORM command</li>
504<li>Any command except DISCONNECT act as a heartbeat. Peers SHOULD NOT send HEARTBEAT commands while sending other commands.</li> 638<li>Any command except DISCONNECT act as a heartbeat. Peers SHOULD NOT send HEARTBEAT commands while sending other commands.</li>
505<li>Both worker and broker MUST send heartbeats at regular and agreed-upon intervals.</li> 639<li>Worker and broker MUST send heartbeats at regular and agreed-upon intervals.</li>
640<li>Scheduler and broker MUST send heartbeats at regular and agreed-upon intervals.</li>
506<li>If the worker detects that the broker disconnected it SHOULD restart the conversation.</li> 641<li>If the worker detects that the broker disconnected it SHOULD restart the conversation.</li>
507<li>If the broker detects that a worker has disconnected it should stop sending it a message of any type.</li> 642<li>If the broker detects that a worker has disconnected it should stop sending it a message of any type.</li>
643<li>If the scheduler detects that the broker disconnects it SHOULD restart the conversation.</li>
644<li>If the broker detects that a scheduler has disconnected it should ??????????.</li>
508</ul> 645</ul>
509</div></blockquote> 646</div></blockquote>
510</div> 647</div>
511<div class="section" id="request-headers"> 648<div class="section" id="request-headers">
512<h3>Request Headers<a class="headerlink" href="#request-headers" title="Permalink to this headline">¶</a></h3> 649<h2>REQUEST Headers<a class="headerlink" href="#request-headers" title="Permalink to this headline">¶</a></h2>
513<p>Headers MUST be 0 to many comma seperated values inserted into the header field. If there are no headers requried, send an empty string MUST be sent where headers are required.</p> 650<p>Headers MUST be 0 to many comma seperated values inserted into the header field. If there are no headers required, send an empty string MUST be sent where headers are required.</p>
514<p>Below is a table which defines and describes the headers.</p> 651<p>Below is a table which defines and describes the headers.</p>
515<table border="1" class="docutils"> 652<table border="1" class="docutils">
516<colgroup> 653<colgroup>
@@ -551,7 +688,6 @@
551</table> 688</table>
552</div> 689</div>
553</div> 690</div>
554</div>
555 691
556 692
557 </div> 693 </div>