You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec_3.rst
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Goals
30
30
-----
31
31
32
32
The Flux message protocol v1 provides a way for Flux utilities and services to
33
-
communicate with one another within the context of a job. It has
33
+
communicate with one another within the context of a flux instance. It has
34
34
the following specific goals:
35
35
36
36
- Endpoint-count scalability (e.g. to 100K nodes) through multi-hop
@@ -58,10 +58,10 @@ Background
58
58
``flux-broker`` is a message broker daemon for the Flux resource manager
59
59
framework. A Flux *instance* is a set of interconnected ``flux-broker`` tasks
60
60
that together provide a shared communications substrate for distributed
61
-
resource manager services within a job. Services and utilities communicate
62
-
by passing messages through the session brokers. There are four
63
-
types of messages: events, requests, responses, and keepalives, which
64
-
share a common structure described herein.
61
+
resource manager services. Services and utilities communicate by passing
62
+
messages through the session brokers. There are four types of messages:
63
+
events, requests, responses, and control messages, which share a common
64
+
structure described herein.
65
65
66
66
Event messages are published such that they are available to subscribers
67
67
throughout the instance. Events are published with a *topic string*
@@ -77,8 +77,9 @@ Responses are optional replies to requests. They follow the ZeroMQ
77
77
ROUTER-DEALER message flow, which unwinds the source address route
78
78
accumulated by the request, and uses them to select among peers at each hop.
79
79
80
-
Keepalives are control messages used by one peer to indicate to another
81
-
peer that it is still alive when it is not otherwise communicating.
80
+
Control messages are used for connection management and status communication
81
+
between brokers. Unlike the other message types, they are only used between
82
+
directly connected peers, never routed.
82
83
83
84
84
85
Implementation
@@ -242,13 +243,13 @@ ABNF grammar [#f2]_
242
243
243
244
message = C:request *S:response
244
245
/ S:event
245
-
/ C:keepalive
246
+
/ C:control
246
247
247
248
; Multi-part ZeroMQ messages
248
249
C:request = [routing] topic [payload] PROTO
249
250
S:response = [routing] topic [payload] PROTO
250
251
S:event = [routing] topic [payload] PROTO
251
-
C:keepalive = PROTO
252
+
C:control = PROTO
252
253
253
254
; Route frame stack, ZeroMQ DEALER-ROUTER format
254
255
routing = *identity delimiter
@@ -262,12 +263,12 @@ ABNF grammar [#f2]_
262
263
payload = *OCTET ; payload ZeroMQ frame
263
264
264
265
; Protocol frame
265
-
PROTO = request / response / event / keepalive
266
+
PROTO = request / response / event / control
266
267
267
268
request = magic version %x01 flags userid rolemask nodeid matchtag
268
269
response = magic version %x02 flags userid rolemask errnum matchtag
269
270
event = magic version %x04 flags userid rolemask sequence unused
270
-
keepalive = magic version %x08 flags userid rolemask errnum status
271
+
control= magic version %x08 flags userid rolemask type status
271
272
272
273
; Constants
273
274
magic = %x8E ; magic cookie
@@ -306,9 +307,15 @@ ABNF grammar [#f2]_
306
307
; Monotonic sequence number in network byte order
307
308
sequence = 4OCTET
308
309
310
+
; Control message type
311
+
type = 4OCTET
312
+
313
+
; Control message status
314
+
status = 4OCTET
315
+
309
316
; unused 4-byte field
310
317
unused = %x00.00.00.00
311
318
312
319
.. [#f1] `RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format <https://www.rfc-editor.org/rfc/rfc7159.txt>`__, T. Bray, Google, Inc, March 2014.
313
320
314
-
.. [#f2] For convenience: the ``C:request``, ``S:response``, ``S:event``, and ``C:keepalive`` ABNF non-terminals refer to ZeroMQ messages, sent by client or server, and built from ordered ZeroMQ message parts (frames). Other non-terminals are built from concatenated ABNF terminals per usual. Thus it is meaningful for ``delimiter``, a message frame, to have zero length, since a zero-length message frame is valid ZMTP.
321
+
.. [#f2] For convenience: the ``C:request``, ``S:response``, ``S:event``, and ``C:control`` ABNF non-terminals refer to ZeroMQ messages, sent by client or server, and built from ordered ZeroMQ message parts (frames). Other non-terminals are built from concatenated ABNF terminals per usual. Thus it is meaningful for ``delimiter``, a message frame, to have zero length, since a zero-length message frame is valid ZMTP.
0 commit comments