-
Notifications
You must be signed in to change notification settings - Fork 3
Message/PresenceMessage/Annotation size #331
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
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 |
|---|---|---|
|
|
@@ -433,7 +433,7 @@ h3(#rest-annotations). RestAnnotations | |
| *** @(RSAN1a1)@ In languages where method overloading is supported, the first argument should also accept a @Message@ object (which must contain a populated @serial@ field) | ||
| *** @(RSAN1a2)@ The form of the second argument may accept any language-idiomatic representation (e.g. plain objects in untyped languages), but must allow the user to supply at least the @type@, @clientId@, @name@, @count@, @data@, and @extras@ fields | ||
| *** @(RSAN1a3)@ The SDK must validate that the user supplied a @TAN5b@ @type@. (All other fields are optional) | ||
| *** @(RSAN1a4)@ The SDK may validate that the total size of the annotation or (if publishing an array) annotations, calculated identically to message size per "TO3l8":#TO3l8, exceeds the @maxMessageSize@, then the client library should reject the publish and indicate an error with code 40009 | ||
| *** @(RSAN1a4)@ The SDK may validate that the total size of the annotation or (if publishing an array) annotations, calculated identically to message size per "TAN4":#TAN4, exceeds the @maxMessageSize@, then the client library should reject the publish and indicate an error with code 40009 | ||
| ** @(RSAN1c)@ The SDK must POST a request body consisting of an array with one element, which is the annotation to be published | ||
| *** @(RSAN1c1)@ The @Annotation.action@ must be set to @ANNOTATION_CREATE@ | ||
| *** @(RSAN1c2)@ The @Annotation.messageSerial@ must be set to the identifier specified in the first argument to @publish()@ | ||
|
|
@@ -1452,8 +1452,10 @@ h4. Message | |
| * @(TM6)@ The size of the @Message@ for "TO3l8":#TO3l8 is calculated as follows: | ||
| ** @(TM6a)@ The size is the sum of the sizes of the @name@, @data@, @clientId@, and @extras@ properties | ||
| ** @(TM6b)@ The size of an @Object@ or @Array@ @data@ property is its string length after being JSON-stringified | ||
| ** @(TM6c)@ The size of a @binary@ @data@ property is its size in bytes (of the actual binary, not the base64 representation, regardless of whether the binary protocol is in use) | ||
| ** @(TM6f)@ The size of a @string@ @data@ property is its length | ||
| ** @(TM6c)@ The size of a @binary@ @data@ property is its size in bytes (of the actual binary, not the base64 representation, regardless of whether the binary protocol is in use). | ||
| ** @(TM6f)@ The size of a @string@ @data@ property is its UTF-8 encoded length in bytes (because of Non-ASCII characters) | ||
| ** @(TM6g)@ The size of a @string@ @name@ property is its length | ||
| ** @(TM6h)@ The size of a @string@ @clientId@ property is its length | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no reason that (if ably-js doesn't do this that's technically a bug, though not one that matters much. if the difference changes the result then it wasn't grossy over the limit and it can just get rejected by the server, shrug)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, then it will be better to be specific for each spec point 👍
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
| ** @(TM6d)@ The size of the @extras@ property is the string length of its JSON representation | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we definitely can, they can contain arbitrary data, eg in a push payload
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks will update for all
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
| ** @(TM6e)@ The size of a @null@ or omitted property is zero | ||
| * @(TM7)@ The SDK may expose a series of functions (static factory methods on a Message or otherwise, wherever is language idiomatic; for some languages this might just be types that can be used for type assertions, etc), that take a deserialized @JsonObject@, one of the aggregated summaries for a particular annotation type (that is, a value from the @TM2q@ @summary@ @Dict@), and outputs a strongly-typed summary entry, for ease of use by the end user (particularly in languages where manipulating plain objects is difficult). | ||
|
|
@@ -1628,7 +1630,7 @@ h4. ObjectData | |
| ** @(OD3b)@ If set, the size of a @boolean@ property is 1 | ||
| ** @(OD3c)@ If set, the size of a @bytes@ property is its size in bytes (of the actual binary, not the base64 representation, regardless of whether the binary protocol is in use) | ||
| ** @(OD3d)@ If set, the size of a @number@ property is 8 | ||
| ** @(OD3e)@ If set, the size of a @string@ property is its length | ||
| ** @(OD3e)@ If set, the size of a @string@ property is its UTF-8 encoded length in bytes (because of Non-ASCII characters) | ||
| ** @(OD3f)@ The size of a @null@ or omitted property is zero | ||
|
|
||
| h4. Annotation | ||
|
|
@@ -1650,6 +1652,7 @@ h4. Annotation | |
| ** @(TAN2k)@ @type@ string: a string indicating the type of the annotation, handled opaquely by the SDK | ||
| ** @(TAN2l)@ @extras@ object (optional): A JSON-encodable object for arbitrary metadata | ||
| * @(TAN3)@ @fromEncoded@ and @fromEncodedArray@ are alternative constructors that take an (already deserialized) @Annotation@-like object (or array of such objects), and optionally a @channelOptions@, and return an @Annotation@ (or array of @Annotations@) that's decoded and decrypted analagously to @TM3@ and @TP4@ | ||
| * @(TAN4)@ The size of the @Annotation@ for "TO3l8":#TO3l8 is calculated in the same way as for @Message@; see "TM6":#TM6 | ||
|
|
||
| h4. ProtocolMessage | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.