aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorjason2016-05-24 16:49:54 -0600
committerjason2016-05-24 16:49:54 -0600
commita592ba06ea019bbb0051ffe5fc006d98560d038a (patch)
tree588590a6423a19c59aa2cac9f57b7025f4f5f44b /docs
parent2c599d965493b3658ffadc0c3e9e1b5a209cf1ba (diff)
downloadeventmq-a592ba06ea019bbb0051ffe5fc006d98560d038a.tar.gz
eventmq-a592ba06ea019bbb0051ffe5fc006d98560d038a.zip
More work for named queues
- Rename `WORKERS` setting to `CONCURRENT_JOBS` for more clarity. Added this setting to the command line options, the ini .conf & default settings conf.py files. - Added support for JSON style arrays in INI config. - Added support for weighted named queues. The style for the setting is [[weight, "name"], [weight, "name"]]. Configured in both the INI and command line for job manager. Added documentation. - Updated the spec for the INFORM message. Weights are sent with the queue names. If there are no weights specified they will be given the default value of 0. - updated Router.queues to a list from a deque so that it can be sorted by priority more easily.
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py7
-rw-r--r--docs/protocol.rst13
-rw-r--r--docs/settings_file.rst34
3 files changed, 36 insertions, 18 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 864bbcf..aa23956 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -16,6 +16,7 @@ import sys
16import os 16import os
17import shlex 17import shlex
18 18
19import eventmq # for __version__
19# If extensions (or modules to document with autodoc) are in another directory, 20# If extensions (or modules to document with autodoc) are in another directory,
20# add these directories to sys.path here. If the directory is relative to the 21# add these directories to sys.path here. If the directory is relative to the
21# documentation root, use os.path.abspath to make it absolute, like shown here. 22# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -52,15 +53,15 @@ master_doc = 'index'
52 53
53# General information about the project. 54# General information about the project.
54project = u'EventMQ' 55project = u'EventMQ'
55copyright = u'2015, eventboard.io' 56copyright = u'2016, eventboard.io'
56author = u'eventboard.io' 57author = u'EventMQ Contributors'
57 58
58# The version info for the project you're documenting, acts as replacement for 59# The version info for the project you're documenting, acts as replacement for
59# |version| and |release|, also used in various other places throughout the 60# |version| and |release|, also used in various other places throughout the
60# built documents. 61# built documents.
61# 62#
62# The short X.Y version. 63# The short X.Y version.
63version = '0' 64version = eventmq.__version__
64# The full version, including alpha/beta/rc tags. 65# The full version, including alpha/beta/rc tags.
65release = '0' 66release = '0'
66 67
diff --git a/docs/protocol.rst b/docs/protocol.rst
index 4c2aff0..c341403 100644
--- a/docs/protocol.rst
+++ b/docs/protocol.rst
@@ -71,7 +71,7 @@ FRAME Value Description
711 eMQP/1.0 Protocol version 711 eMQP/1.0 Protocol version
722 REQUEST command 722 REQUEST command
733 _MSGID_ A unique id for the msg 733 _MSGID_ A unique id for the msg
744 _QUEUE_NAME_ the name of the queue the worker belongs to 744 _QUEUE_NAME_ the name of the queue the request should be sent to
755 _HEADERS_ dictionary of headers. can be an empty set 755 _HEADERS_ dictionary of headers. can be an empty set
766 _MSG_ The message to send 766 _MSG_ The message to send
77====== ============== =========== 77====== ============== ===========
@@ -85,7 +85,7 @@ FRAME Value Description
851 eMQP/1.0 Protocol version 851 eMQP/1.0 Protocol version
862 PUBLISH command 862 PUBLISH command
873 _MSGID_ A unique id for the msg 873 _MSGID_ A unique id for the msg
884 _TOPIC_NAME_ the name of the queue the worker belongs to 884 _TOPIC_NAME_ the name of the topic this message should be published across
895 _HEADERS_ csv list of headers 895 _HEADERS_ csv list of headers
906 _MSG_ The message to send 906 _MSG_ The message to send
91====== ============== =========== 91====== ============== ===========
@@ -99,7 +99,7 @@ FRAME Value Description
991 eMQP/1.0 Protocol version 991 eMQP/1.0 Protocol version
1002 SCHEDULE command 1002 SCHEDULE command
1013 _MSGID_ A unique id for the msg 1013 _MSGID_ A unique id for the msg
1024 _TOPIC_NAME_ name of queue that the job should run in 1024 _QUEUE_NAME_ name of queue that the job should run in
1035 _HEADERS_ csv list of headers for this message 1035 _HEADERS_ csv list of headers for this message
1046 _MSG_ The message to send 1046 _MSG_ The message to send
105====== ============== =========== 105====== ============== ===========
@@ -113,7 +113,7 @@ FRAME Value Description
1131 eMQP/1.0 Protocol version 1131 eMQP/1.0 Protocol version
1142 UNSCHEDULE command 1142 UNSCHEDULE command
1153 _MSGID_ A unique id for the msg 1153 _MSGID_ A unique id for the msg
1164 _TOPIC_NAME_ ignored for this command, broadcasted to all queues 1164 _QUEUE_NAME_ ignored for this command, broadcasted to all queues
1175 _HEADERS_ csv list of headers for this message 1175 _HEADERS_ csv list of headers for this message
1186 _MSG_ The message to send 1186 _MSG_ The message to send
119====== ============== =========== 119====== ============== ===========
@@ -129,7 +129,7 @@ FRAME Value Description
1291 eMQP/1.0 Protocol version 1291 eMQP/1.0 Protocol version
1302 INFORM command 1302 INFORM command
1313 _MSGID_ A unique id for the msg 1313 _MSGID_ A unique id for the msg
1324 _QUEUE_NAME_ csv seperated names of queue the worker belongs to 1324 Queues. Unused for scheduler
1335 scheduler type of peer connecting 1335 scheduler type of peer connecting
134====== ============== =========== 134====== ============== ===========
135 135
@@ -144,7 +144,7 @@ FRAME Value Description
1441 eMQP/1.0 Protocol version 1441 eMQP/1.0 Protocol version
1452 INFORM command 1452 INFORM command
1463 _MSGID_ A unique id for the msg 1463 _MSGID_ A unique id for the msg
1474 _QUEUE_NAME_ csv seperated names of queue the worker belongs to. 1474 _QUEUES_ csv seperated arrays containing an int and a string for weight and name. e.g. [40, 'email']
1485 worker type of peer connecting 1485 worker type of peer connecting
149====== ============== =========== 149====== ============== ===========
150 150
@@ -203,7 +203,6 @@ Heartbeating
203 * If the worker detects that the broker disconnected it SHOULD restart the conversation. 203 * If the worker detects that the broker disconnected it SHOULD restart the conversation.
204 * If the broker detects that a worker has disconnected it should stop sending it a message of any type. 204 * If the broker detects that a worker has disconnected it should stop sending it a message of any type.
205 * If the scheduler detects that the broker disconnects it SHOULD restart the conversation. 205 * If the scheduler detects that the broker disconnects it SHOULD restart the conversation.
206 * If the broker detects that a scheduler has disconnected it should ??????????.
207 206
208REQUEST Headers 207REQUEST Headers
209--------------- 208---------------
diff --git a/docs/settings_file.rst b/docs/settings_file.rst
index 07d2338..b0bc36c 100644
--- a/docs/settings_file.rst
+++ b/docs/settings_file.rst
@@ -15,16 +15,34 @@ Scheduler
15Job Manager 15Job Manager
16*********** 16***********
17 17
18concurrent_jobs
19===============
20Default: 4
21
22This is the number of concurrent jobs the indiviudal job manager should execute
23at a time. If you are using the multiprocess or threading model this number
24becomes important as you will want to control the load on your server. If the
25load equals the number of cores on the server, processes will begin waiting for
26cpu cycles and things will begin to slow down.
27
28A safe number to choose if your jobs block a lot would be (2 * cores). If your
29jobs are cpu intensive you will want to set this number to the number of cores
30you have or (cores - 1) to leave cycles for the os and other processes. This is
31something that will have to be tuned based on the jobs that are
32running. Grouping similar jobs in named queues will help you tune this number.
33
18queues 34queues
19====== 35======
20Default: default 36Default: (10, default)
21 37
22Comma seperated list of queues to process jobs for. Example: 38Semi-colon seperated list of queues to process jobs for with thier
23``queues=high,med,low,default``. The philosophy taken for this list is each job 39weights. Example: ``queues=(10, data_process); (15, email)``. With these
24manager should have a single primary queue. This queue is the first in the list 40weights and the ``CONCURRENT_JOBS`` setting, you should be able to tune managers
25(in the case of the example ``high`` is the primary queue). Subsequent queues 41running jobs locally pretty efficiently. If you have a larger box with a weight
26are queues that this job manager should help out with should jobs be backed up, 42of 50 on q1 and 8 concurrent jobs and a smaller box with a weight 30 and 4
27and there are no primary queue jobs to take care of. 43concurrent jobs, the q1 jobs will be sent to the large box until it is no longer
44accepting jobs. At this point jobs will start to be sent to the next highest
45number until the large box is ready to accept another q1 job.
28 46
29.. note:: 47.. note::
30 48