-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message type collection #29
Comments
A few questions:
A few ideas / answers:
|
Should we interpret an empty message as acknowledgment? At least as an "message received and also heartbeat" acknowledgment. That would be good for a "reply to every message, at least with a heartbeat" heartbeat pattern, see #4 . Remember: zmq messages arrive either complete or not, so if we get the header frame, we know, that we have all frames. Therefore, there is no possibility to interpret a partially received message as an acknowledgment. |
We could use the
More than one would certainly be useful! At least for SET it would be a dict. We just have one message over the network, the Actor asks the Driver for a number of updates, and sends back the reply.
That might be useful, we'll have to find a good way to specify the format. This also depends on the API of Actor -- if we are dealing only with the one argument
Yeah, logs should be emitted/published into some logging stream. Bonus points iiuc: if nobody's subscribed, no message is emitted). If that's on the data protocol or a separate one, I can't decide now.
Seems reasonable. An
Yeah, however we might also mutate that info in the header (add/remove Coordinator info), and it could be attractive to keep the payload alone meaningful on its own (i.e. without the message metadata) -- on their way through the system/code, at some point the metadata might be stripped off.
I'd keep this separated as this is for separate concerns. Why should we mix Parameter updates with housekeeping updates? What's the attraction of having one less message type/command, but "multiplexing/overloading" another?
yeah, why not.
I don't think so; we should have a distinct |
Added |
Here again some notable differences of the DataProtocol (PUB-SUB) in regard to the Control Protocol:
Therefore, we have to treat the protocols differently (in the control protocol, we separate header from payload, in the data protocol, it is one message |
I see the Components list and the Status as a property of the Coordinator/Component. If I want a property, I call GET.
Avro has "null"
The idea is, that the "message received" answer, is just a heartbeat (the other side know, you're still alive). We could say, that the Component may send a "ping" (content may be "null", not empty) message to the Coordinator, which responds with its typical answer (empty frame). |
Well, but (so far), a If you want to absolutely use |
Sorry, I missed all the "Actors" and always thought about any Component. |
Why is that? Isn't the expected reply acknowledgement (enough) for a specific message?
So, to understand what you wrote correctly (and maybe a little in "devil's advocate" style):
Do we really need a ratio "normal content": acks of 1:1? A "standard" command exchange causes 4 messages? |
thanks for that, that's illuminating. I agree with the notion of not reinventing stuff! |
Actually, it's more than 4 when the coordinators are involved! If I computed correctly, 8 messages with 1 coordinator, and 12 messages with 2 Coordinators (inter-Node), just to send "Hey, C2.CompA, give me the temperature" -> "It's -5 degrees". 😕 I guess we'll need the high water marks 😅 |
That is the reason I went for the ping pong heartbeat: https://zguide.zeromq.org/docs/chapter4/#Heartbeating-for-Paranoid-Pirate We could (to reduce data transfer) make these heartbeats without any frames (even without names!). |
I thought to keep them separate, as you have to connect the Proxies differently, than the Control Coordinators. |
Yeah, but that could be part of the |
As the Data protocol is inherently different (just one way), the connection between its Proxies has to be different from the Coordinator connection. Let's discuss it in a separate issue. Whether these different parts end up in one piece of software or not, the protocols remain separate and the question does not slow down the protocol definition. |
I propose to rename CONNECT / DISCONNECT to SIGNIN / SIGNOUT, in order to differentiate them better from the actual socket connection. For example, as a requirement to Message handling, we can state, that the Components must be signed in (which requires to be connected as well). |
Good call! |
According to the latest state of the PR #38 (and my latest comments therein, e.g. this comment), I think we should boil down the Control Messages to
In the comments to #38, relating to the discussion in #44, I proposed to simplify the messages so that Coordinators do not announce individual
|
Let's avoid discussing the propagation on sign-in/-ou in the issue collecting message types -> #46. |
Regarding message types (and their encoding), we can orient at COAP: https://en.wikipedia.org/wiki/Constrained_Application_Protocol#Request/response_code_(8_bits) |
LOCK / UNLOCK a resource (or part of it), see #14 |
Let us start an informal list of "command verbs"/message types that we need within ECP. This way, we get a feeling about the set of commands we need and how they apply to different Components.
I have here used the term "message type" to also refer to the various commands of the control protocol, as the boundaries can be diffuse, see e.g.
KNOWN_COMPS
. I'm open that we restructure that if needed.This should not be considered formally specified yet, but serve as a basis for what we later add to the specification or to find out how well Avro fits our needs.
Let's put the command verb/message type in CAPS, and any arguments between
<angle brackets>
, and specify if a return message is required (disregarding transport-layer acknowledgements). This is not the specific syntax yet, so don't get hung up on separator choices, etc.Feel free to edit the comment as needed.
Housekeeping
REQ_STATUS
: Request current status of a Component. Reply:STATUS <status description>
ERROR <error level, error description>
: Message detailing an error, error categories TBD. Can also be a reply to a message.LOG <log level, log message>
: Log message including log level (levels TBD).Routing
SIGN_IN
: Announce the presence of the sending Component, and request registration with the targeted Coordinator. Reply: Outcome of the sign-in attempt.SIGN_OUT
: Request the deregistration of the sending Component from the targeted Coordinator. Reply: If accepted, confirm deregistration. This will be the last message from the Coordinator to that Component in that connection's lifetime.LIST_KNOWN_COMPS
: Instruct a Coordinator to send the list of Components it knows (both Node-local and distributed). Reply: see next.KNOWN_COMPS <Coordinatorname> <list of component IDs>
: This might also be sent out upon Component connection, so it's not strictly a "command" or a direct reply to a command.Control
ACKNOWLEDGE
: Acknowledge a received message or correct execution of a command.GET <parametername>
: Request the named Parameter's most recent value from an Actor. Reply: The value (and possibly the name).SET <parametername> <value>
: Set the named Parameter of an Actor to the passed value.CALL <actionname> [args]
: Call the named action of an Actor, using 0 or more arguments. TBD how to deal with (lack of) return values.LIST_PARAMS
/LIST_ACTIONS
might not be necessary if we use Avro as the "schema" of an entity is part of the connection handshake.START_POLLING <interval_ms> [1+ parameter names]
: Command an Actor to fetch (and publish) fresh values for these parameters at the given interval. Interval given first as we have variable nr of arguments afterwards.STOP_POLLING [1+ parameter names]
Stop polling these parameters.Data
DATA [Dict with 1+ parameter-value pairs]
Published Parameter values. TBC if message payload should include Component ID.The text was updated successfully, but these errors were encountered: