docs: add possibility of additional message modes.#660
docs: add possibility of additional message modes.#660grant wants to merge 5 commits intocloudevents:masterfrom
Conversation
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
cneijenhuis
left a comment
There was a problem hiding this comment.
Sorry, but I still disagree.
Batching (in the HTTP binding) is one implementation of the structured mode. It is not an additional mode.
It fits the definition:
A "structured-mode message" is one where the event is fully encoded using
a stand-alone event format and stored in the message body.
because in a batch, each event is fully encoded using a stand-alone event format and stored in the message body.
I think what is confusing here is that it's easy to equate the message body with request/response body. That MAY be the case, but it's not a MUST. The protocol binding is free to add more things to the request/response body, and is free to batch multiple events (and therefore message bodies) into a single request/response body.
|
Thanks for the response @cneijenhuis. Here are responses:
Which specific part do you disagree with?
No. Batched mode has a different HTTP |
|
I think the misunderstanding is rooted in equating the All that the structured message mode is defining is that you need an Event Format.
Both the The whole thing would probably be easier to grok if the Content-Type was We could rename the HTTP content mode Hope that helps! |
Co-authored-by: Christoph Neijenhuis <christoph.neijenhuis@commercetools.de>
|
Thanks for a bit more clarity. I don't see |
|
@grant can you sign all commits? The DCO checker isn't happy |
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
|
Is there a quick way to DCO sign-off? Can you just add the sign-off in the commit message when squash committing? i.e. add this line: |
|
It looks like we're converging on a taxonomy where batched is not a separate mode, but a format under structured mode. I think that makes sense, but it would then be good if we could make corresponding updates to the http protocol spec, section 3 to align with this. Specifically:
|
|
@grant did you want to address the comment above ^^^ ? |
|
Also, still need you to sign all commits |
|
Right now I'm not able to fix this PR. It seems like there are multiple issues at hand. I'll close it. Perhaps we can discuss in a CE call, or someone else can pick up this PR. |
@duglin Again, this is not the terminology many protocols use! For many protocols, the message is NOT the same as transport envelope body, but a structure within it. Examples:
In the spec we could choose to define that the message body is the same as the transport envelope body, but I don't see any advantage in doing so. It also raises the question why we have the concept of a message at all. I still think it should be a 3-step process:
The Transport may support batching. In this case (as for RabbitMQ/PubSub/Kafka above), we only need to define how to map a CloudEvent to a Message. The existing Transport takes care of the rest. |
|
@cneijenhuis do you think it's worth trying to tweak the wording at all? If so, do you want to take a stab at it? |
|
@duglin My first stab was already here: #660 (comment) but I took another one here: #672 |
Mentions the possibility of protocols adding different message modes (such as
batched).Fixes #645.