-
Notifications
You must be signed in to change notification settings - Fork 603
Size Constraints #405
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
Size Constraints #405
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ This document is a working draft. | |
| - [Type System](#type-system) | ||
| - [Context Attributes](#context-attributes) | ||
| - [Data Attribute](#data-attribute) | ||
| - [Size Limits](#size-limits) | ||
| - [Privacy & Security](#privacy-and-security) | ||
| - [Example](#example) | ||
|
|
||
|
|
@@ -425,6 +426,39 @@ encapsulated within the `data` attribute. | |
| - Constraints: | ||
| - OPTIONAL | ||
|
|
||
| # Size Limits | ||
|
|
||
| In many scenarios, CloudEvents will be forwarded through one or more | ||
| generic intermediaries, each of which might impose limits on the size of | ||
| forwarded events. CloudEvents might also be routed to consumers, like | ||
| embedded devices, that are storage or memory-constrained and therefore | ||
| would struggle with large singular events. | ||
|
|
||
| The "size of an event" is it's wire-size, and includes every bit that is | ||
|
||
| transmitted on the wire for the event: transport frame-metadata, event | ||
| metadata, and event data, based on the chosen event format and the chosen | ||
| protocol binding. | ||
|
|
||
| If an application configuration requires for events to be routed across | ||
| different transports or for events to be re-encoded, the least efficient | ||
| transport and encoding used by the application SHOULD be considered for | ||
| compliance with these size constraints: | ||
|
|
||
| - Intermediaries MUST forward events of a size of at least 64 KByte. | ||
|
||
| - Consumers SHOULD accept events of a size of at least 64 KByte. | ||
|
|
||
| In effect, these rules will allow events of up to 64 KByte to be published | ||
|
||
| and routed safely, with it being in any particular consumer's control, whether | ||
| it wants to accept or reject events of that size due to local considerations. | ||
|
|
||
| Generally, CloudEvents publishers SHOULD keep events compact by avoiding to | ||
| embed large data items into event payloads and rather use the event payload | ||
| to link to such data items. From an access control perspective, this approach | ||
| also allows for a broader distribution of events, because accessing | ||
| event-related details through resolving links allows for differentiated access | ||
| control and selective disclosure, rather than having sensitive details embedded | ||
| in the event directly. | ||
|
|
||
| # Privacy and Security | ||
|
|
||
| Interoperability is the primary driver behind this specification, enabling such | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to start with the requirements in a compact/clear declaration followed by the explainer text. Seek time is high as written.
Perhaps
Perhaps
MUSTshould beSHOULDto allow for compliant low memory footprint consumers but my expectation is that such circumstances would be fairly narrow and would reduce the value of this section.