diff --git a/delta/commandsEvents/annotations/AddAnnotation/AddAnnotation.adoc b/delta/commandsEvents/annotations/AddAnnotation/AddAnnotation.adoc index a1f1ffd..ad9858e 100644 --- a/delta/commandsEvents/annotations/AddAnnotation/AddAnnotation.adoc +++ b/delta/commandsEvents/annotations/AddAnnotation/AddAnnotation.adoc @@ -1,9 +1,6 @@ [[cmd-AddAnnotation]] ===== Add annotation Add new node <> to <>'s annotations at <>. -<> might be a single node or an arbitrary complex subtree. -All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. -Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} [cols="a,a"] |=== @@ -20,9 +17,14 @@ include::AddAnnotation-diagram.adoc[] [[AddAnnotation.parent, `parent`]]parent:: <> [[AddAnnotation.newAnnotation, `newAnnotation`]]newAnnotation:: <> +Subtree to form a new annotation. +The _anchor node_ MUST contain the <> as _parent_.{fn-org357} +All nodes in that subtree MUST be <>. [[AddAnnotation.index, `index`]]index:: <> +[[AddAnnotation.split, `split`]]split:: <> + [[AddAnnotation.commandId]]commandId:: <> [[AddAnnotation.protocolMessages]]protocolMessages:: <> diff --git a/delta/commandsEvents/annotations/AddAnnotation/AnnotationAdded.adoc b/delta/commandsEvents/annotations/AddAnnotation/AnnotationAdded.adoc index 0c3ee1e..76f4420 100644 --- a/delta/commandsEvents/annotations/AddAnnotation/AnnotationAdded.adoc +++ b/delta/commandsEvents/annotations/AddAnnotation/AnnotationAdded.adoc @@ -18,6 +18,8 @@ All other annotations inside <>'s annotations with index [[AnnotationAdded.index, `index`]]index:: <> +[[AnnotationAdded.split, `split`]]split:: <> + [[AnnotationAdded.originCommands]]originCommands:: <>[] [[AnnotationAdded.sequenceNumber]]sequenceNumber:: <> diff --git a/delta/commandsEvents/annotations/ReplaceAnnotation/AnnotationReplaced.adoc b/delta/commandsEvents/annotations/ReplaceAnnotation/AnnotationReplaced.adoc index 059915b..d186625 100644 --- a/delta/commandsEvents/annotations/ReplaceAnnotation/AnnotationReplaced.adoc +++ b/delta/commandsEvents/annotations/ReplaceAnnotation/AnnotationReplaced.adoc @@ -22,6 +22,8 @@ Nodes in that subtree MAY have references to already existing nodes, and already [[AnnotationReplaced.index, `index`]]index:: <> +[[AnnotationReplaced.split, `split`]]split:: <> + [[AnnotationReplaced.originCommands]]originCommands:: <>[] [[AnnotationReplaced.sequenceNumber]]sequenceNumber:: <> diff --git a/delta/commandsEvents/annotations/ReplaceAnnotation/ReplaceAnnotation.adoc b/delta/commandsEvents/annotations/ReplaceAnnotation/ReplaceAnnotation.adoc index d50c22f..1dfe45f 100644 --- a/delta/commandsEvents/annotations/ReplaceAnnotation/ReplaceAnnotation.adoc +++ b/delta/commandsEvents/annotations/ReplaceAnnotation/ReplaceAnnotation.adoc @@ -3,11 +3,6 @@ Delete current node <>{fn-org371} at <>'s annotations at <>, and all its descendants (including annotation instances). Does NOT change references to any of the deleted nodes.{fn-org285} -Replace existing node <> inside <>'s annotations at <> with new node <>. -<> might be a single node or an arbitrary complex subtree. -All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. -Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} - [cols="a,a"] |=== |Before |After @@ -21,6 +16,9 @@ include::ReplaceAnnotation-diagram.adoc[] [horizontal] .Parameters [[ReplaceAnnotation.newAnnotation, `newAnnotation`]]newAnnotation:: <> +Subtree to form a new annotation. +The _anchor node_ MUST contain the <> as _parent_.{fn-org357} +All nodes in that subtree MUST either be <> or <>. [[ReplaceAnnotation.parent, `parent`]]parent:: <> @@ -28,6 +26,8 @@ include::ReplaceAnnotation-diagram.adoc[] [[ReplaceAnnotation.replacedAnnotation, `replacedAnnotation`]]replacedAnnotation:: <> +[[ReplaceAnnotation.split, `split`]]split:: <> + [[ReplaceAnnotation.commandId]]commandId:: <> [[ReplaceAnnotation.protocolMessages]]protocolMessages:: <> diff --git a/delta/commandsEvents/children/AddChild/AddChild.adoc b/delta/commandsEvents/children/AddChild/AddChild.adoc index dc31ff3..debf773 100644 --- a/delta/commandsEvents/children/AddChild/AddChild.adoc +++ b/delta/commandsEvents/children/AddChild/AddChild.adoc @@ -1,9 +1,6 @@ [[cmd-AddChild]] ===== Add child Add new node <> to <> in <> at <>. -<> might be a single node or an arbitrary complex subtree. -All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. -Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} [cols="a,a"] |=== @@ -20,11 +17,16 @@ include::AddChild-diagram.adoc[] [[AddChild.parent, `parent`]]parent:: <> [[AddChild.newChild, `newChild`]]newChild:: <> +Subtree to form a new child. +The _anchor node_ MUST contain the <> as _parent_.{fn-org357} +All nodes in that subtree MUST be <>. [[AddChild.containment, `containment`]]containment:: <> [[AddChild.index, `index`]]index:: <> +[[AddChild.split, `split`]]split:: <> + [[AddChild.commandId]]commandId:: <> [[AddChild.protocolMessages]]protocolMessages:: <> diff --git a/delta/commandsEvents/children/AddChild/ChildAdded.adoc b/delta/commandsEvents/children/AddChild/ChildAdded.adoc index a3dacf2..5904fc2 100644 --- a/delta/commandsEvents/children/AddChild/ChildAdded.adoc +++ b/delta/commandsEvents/children/AddChild/ChildAdded.adoc @@ -20,6 +20,8 @@ All other children inside <>'s <> wit [[ChildAdded.index, `index`]]index:: <> +[[ChildAdded.split, `split`]]split:: <> + [[ChildAdded.originCommands]]originCommands:: <>[] [[ChildAdded.sequenceNumber]]sequenceNumber:: <> diff --git a/delta/commandsEvents/children/ReplaceChild/ChildReplaced.adoc b/delta/commandsEvents/children/ReplaceChild/ChildReplaced.adoc index c448a61..689f01d 100644 --- a/delta/commandsEvents/children/ReplaceChild/ChildReplaced.adoc +++ b/delta/commandsEvents/children/ReplaceChild/ChildReplaced.adoc @@ -25,6 +25,8 @@ Nodes in that subtree MAY have references to already existing nodes, and already [[ChildReplaced.index, `index`]]index:: <> +[[ChildReplaced.split, `split`]]split:: <> + [[ChildReplaced.originCommands]]originCommands:: <>[] [[ChildReplaced.sequenceNumber]]sequenceNumber:: <> diff --git a/delta/commandsEvents/children/ReplaceChild/ReplaceChild.adoc b/delta/commandsEvents/children/ReplaceChild/ReplaceChild.adoc index 48594a6..6a8b9fe 100644 --- a/delta/commandsEvents/children/ReplaceChild/ReplaceChild.adoc +++ b/delta/commandsEvents/children/ReplaceChild/ReplaceChild.adoc @@ -4,9 +4,6 @@ Delete current child <>{fn-org371} inside <> inside <>'s <> at <> with new node <>. -`newChild` might be a single node or an arbitrary complex subtree. -All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. -Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} [cols="a,a"] |=== @@ -21,6 +18,9 @@ include::ReplaceChild-diagram.adoc[] [horizontal] .Parameters [[ReplaceChild.newChild, `newChild`]]newChild:: <> +Subtree to form a new child. +The _anchor node_ MUST contain the <> as _parent_.{fn-org357} +All nodes in that subtree MUST either be <> or <>. [[ReplaceChild.parent, `parent`]]parent:: <> @@ -30,6 +30,8 @@ include::ReplaceChild-diagram.adoc[] [[ReplaceChild.replacedChild, `replacedChild`]]replacedChild:: <> +[[ReplaceChild.split, `split`]]split:: <> + [[ReplaceChild.commandId]]commandId:: <> [[ReplaceChild.protocolMessages]]protocolMessages:: <> diff --git a/delta/commandsEvents/commands.adoc b/delta/commandsEvents/commands.adoc index 560cc02..1e699fb 100644 --- a/delta/commandsEvents/commands.adoc +++ b/delta/commandsEvents/commands.adoc @@ -1,21 +1,7 @@ [[commands]] === Commands -==== Lifecycle -[plantuml, commandsLifecycle, svg] ----- -hide empty description - -[*] -> Created: client\ncreates -Created -> Sent: client\nsends - -Sent --> Failed: repository\ninvalid command -Failed -> [*]: client\ndiscards - -Sent -> Received: repository\nreceives -Received -> Processed: repository emits event,\nclient receives event -Processed --> [*]: client\ndiscards ----- +include::../continuedChunk/ChunkedCommand.adoc[] include::partitions/CommandPartitions.adoc[] diff --git a/delta/commandsEvents/events.adoc b/delta/commandsEvents/events.adoc index 1c52789..2ea49f4 100644 --- a/delta/commandsEvents/events.adoc +++ b/delta/commandsEvents/events.adoc @@ -1,6 +1,8 @@ [[events]] === Events +include::../continuedChunk/ChunkedEvent.adoc[] + include::partitions/EventPartitions.adoc[] include::nodes/EventNodes.adoc[] diff --git a/delta/commandsEvents/partitions/AddPartition/AddPartition.adoc b/delta/commandsEvents/partitions/AddPartition/AddPartition.adoc index c438d10..f552b32 100644 --- a/delta/commandsEvents/partitions/AddPartition/AddPartition.adoc +++ b/delta/commandsEvents/partitions/AddPartition/AddPartition.adoc @@ -15,10 +15,14 @@ include::AddPartition-diagram.adoc[] [horizontal] .Parameters [[AddPartition.newPartition, `newPartition`]]newPartition:: <> -{fn-org327} root node to form a new partition. -The root node MUST NOT contain a _parent_ (as this is a partition, thus cannot have a parent). -All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. -Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} +Subtree to form a new partition. +The _anchor node_ MUST NOT contain a _parent_ (as this is a partition, thus cannot have a parent). +All nodes in that subtree MUST be <>. ++ +NOTE: This parameter differs from the <>: +The command's parameter contains a whole subtree, whereas the event's parameter only contains the partition node. + +[[AddPartition.split, `split`]]split:: <> [[AddPartition.commandId]]commandId:: <> Id of this command. diff --git a/delta/commandsEvents/partitions/AddPartition/PartitionAdded.adoc b/delta/commandsEvents/partitions/AddPartition/PartitionAdded.adoc index 50a3c14..ae0a3df 100644 --- a/delta/commandsEvents/partitions/AddPartition/PartitionAdded.adoc +++ b/delta/commandsEvents/partitions/AddPartition/PartitionAdded.adoc @@ -9,7 +9,9 @@ This client is now subscribed to any changes to <> [horizontal] .Parameters -[[PartitionAdded.newPartition, `newPartition`]]newPartition:: <> +[[PartitionAdded.newPartition, `newPartition`]]newPartition:: <> +NOTE: This parameter differs from the <>: +The command's parameter contains a whole subtree, whereas the event's parameter only contains the partition node. [[PartitionAdded.originCommands]]originCommands:: <>[] diff --git a/delta/continuedChunk/ChunkedCommand.adoc b/delta/continuedChunk/ChunkedCommand.adoc new file mode 100644 index 0000000..662ae90 --- /dev/null +++ b/delta/continuedChunk/ChunkedCommand.adoc @@ -0,0 +1,27 @@ +[[cmd-ChunkedCommand]] +==== Chunked Command +A <> for one of the following <> commands: + +* <> <> +* <> <> +* <> <> +* <> <> +* <> <> + +.Technical name +`ChunkedCommand` + +[horizontal] +.Parameters +[[ChunkedCommand.chunk, `chunk`]]chunk:: <> or <> +The continued chunk. +MUST adhere to the same constraints as the related <>'s chunk. + +[[ChunkedCommand.continuedChunkCompleted, `continuedChunkCompleted`]]continuedChunkCompleted:: <> + +[[ChunkedCommand.continuedChunkSequenceNumber, `continuedChunkSequenceNumber`]]continuedChunkSequenceNumber:: <> + +[[ChunkedCommand.commandId]]commandId:: <> +Id of the related <> + +[[ChunkedCommand.protocolMessages, `protocolMessages`]]protocolMessages:: <> diff --git a/delta/continuedChunk/ChunkedEvent.adoc b/delta/continuedChunk/ChunkedEvent.adoc new file mode 100644 index 0000000..dff4dd9 --- /dev/null +++ b/delta/continuedChunk/ChunkedEvent.adoc @@ -0,0 +1,27 @@ +[[evnt-ChunkedEvent]] +==== Chunked Event +A <> for one of the following <> events: + +* <> <> +* <> <> +* <> <> +* <> <> +* <> <> + +.Technical name +`ChunkedEvent` + +[horizontal] +.Parameters +[[ChunkedEvent.chunk, `chunk`]]chunk:: <> or <> +The continued chunk. +MUST adhere to the same constraints as the related <>'s chunk. + +[[ChunkedEvent.continuedChunkCompleted, `continuedChunkCompleted`]]continuedChunkCompleted:: <> + +[[ChunkedEvent.chunkedEventSequenceNumber]]chunkedEventSequenceNumber:: <> +Sequence number of the related <> + +[[ChunkedEvent.sequenceNumber]]sequenceNumber:: <> + +[[ChunkedEvent.protocolMessages]]protocolMessages:: <> diff --git a/delta/continuedChunk/ChunkedQueryResponse.adoc b/delta/continuedChunk/ChunkedQueryResponse.adoc new file mode 100644 index 0000000..f3236fd --- /dev/null +++ b/delta/continuedChunk/ChunkedQueryResponse.adoc @@ -0,0 +1,24 @@ +[[qry-ChunkedQueryResponse]] +==== Chunked query response +A <> for a <> response of one of the following queries: + +* <> response <> +* <> response <> + +.Technical name +`ChunkedQueryResponse` + +[horizontal] +.Response parameters +[[ChunkedQueryResponse.chunk, `chunk`]]chunk:: <> or <> +The continued chunk. +MUST adhere to the same constraints as the related <>'s chunk. + +[[ChunkedQueryResponse.continuedChunkCompleted, `continuedChunkCompleted`]]continuedChunkCompleted:: <> + +[[ChunkedQueryResponse.continuedChunkSequenceNumber, `continuedChunkSequenceNumber`]]continuedChunkSequenceNumber:: <> + +[[ChunkedQueryResponse.queryId, `queryId`]]queryId:: <> +Id of the related <> + +[[ChunkedQueryResponse.protocolMessages, `protocolMessages`]]protocolMessages:: <> diff --git a/delta/description.adoc b/delta/description.adoc index 63d5794..57a76db 100644 --- a/delta/description.adoc +++ b/delta/description.adoc @@ -73,20 +73,76 @@ The repository also sends out the same events to subscribed clients, thus _not_ [[message, message]] === Message characteristics -Each message is atomic; it cannot be split. +[[messageAtomicity]] +.Atomicity +Most messages are atomic; they cannot be split. +The exceptions are <>. + +[[messageIdentity, message identity]] +.Message identity Each message has some id unique to the <>: -* Queries have a _query id_. -* Commands have a _command id_.{fn-org305} -* Events have _command sources_.{fn-org306} +* Queries have a <> (for <> together with its <>). +* Commands have a <> (for <> together with its <>).{fn-org305} +* Events have <>.{fn-org423} +[[technicalName, technical name]] +.Technical name Every kind of message has a unique _technical name_. The technical name is a valid programming language identifier as described for <<{m3}.adoc#IKeyed, IKeyed>>. Each binding to a specific protocol might use the technical name in a different way. For example, a JSON binding might have a member containing the technical name of the message, or a Protobuf binding might use the technical name as type name. -Each message optionally can have one or more _[[protocolMessage, protocol message]]protocol message_ consisting of:{fn-org331}{fn-org332} +[[splittableMessage, splittable message]] +==== Splittable messages +All messages containing a <> or <>. + +A client or repository CAN decide to split up a _splittable message_ if that message would exceed the acceptable message size. +LionWeb does not define the acceptable message size, it SHOULD be a parameter for each implementation. + +All _splittable messages_ contain a <>. +If the flag is `false`, the splittable message is self-contained. +If the flag is `true`, one or more <> messages will follow.{fn-org425} + +_Splittable messages_ include: + +Queries:: +* <> response <> +* <> response <> + +Commands:: +* <> <> +* <> <> +* <> <> +* <> <> +* <> <> + +Events:: +* <> <> +* <> <> +* <> <> +* <> <> + +[[continuedChunk, continued chunk]] +.Continued chunks +_Continued chunks_ continue the chunk from the related <>. +Each _continued chunk_ refers to the <> it belongs to. +The _continued chunk_ contains a chunk, a consecutive sequence number, and a <> to signal whether it is the last _continued chunk_, or more will follow. +If the flag is `true`, this is the last _continued chunk_. +If the flag is `false`, one or more _continued chunk_ messages will follow.{fn-org425} + +There MUST NOT be any message in the same <> between the _chunked message_ and all related _continued chunks_. + +_Continued chunks_ include: + +* <> +* <> +* <> + +[[protocolMessage, protocol message]] +==== Protocol messages +Each message optionally can have one or more _protocol message_ consisting of:{fn-org331}{fn-org332} * [[protocolMessage.kind]]`kind` is an <<{m3}.adoc#identifiers, identifier>>-compatible string identifying the message type. Some message kinds are pre-defined in this specification. diff --git a/delta/messages.adoc b/delta/messages.adoc index 9773f38..2536104 100644 --- a/delta/messages.adoc +++ b/delta/messages.adoc @@ -27,6 +27,21 @@ Same format as <<{m3}.adoc#identifiers, identifiers>>; must be unique per <>; must be unique per <>. [[chunkType]]SerializationChunk:: Chunk of nodes as described in <<{serialization}.adoc, serialization specification>>. +Might be a single _anchor node_ or an arbitrary complex subtree with one _anchor node_. +All other nodes MUST be direct or indirect children or annotations of the _anchor node_. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} + +[[shallowChunkType]]ShallowSerializationChunk:: Chunk of nodes as described in <<{serialization}.adoc, serialization specification>>. +MUST contain one single _shallow node_. +The _shallow node_ SHOULD contain all properties of that node, and CAN contain containments, references, and annotations. +However, the chunk MUST NOT contain the actual nodes referenced by containments, references, or annotations (except if the referenced node is the _shallow node_ itself).{fn-org425} + +[[splitFlagType]]SplitFlag:: boolean flag whether the chunk is complete within this <>.{fn-org425} + +[[continuedChunkCompletedFlagType]]ContinuedChunkCompletedFlag:: boolean flag whether this <> completes its <>.{fn-org425} + +[[continuedChunkSequenceNumberType]]ContinuedChunkSequenceNumber:: orders connected <>. +Positive integer that starts at 0 and increments by one for each consecutive <>.{fn-org425} [[eventType]]Event:: Any <>. @@ -53,6 +68,19 @@ This allows a client to know when its command has been processed (either success [[integerType]]integer type:: An integer value. +[[new-nodes, new nodes]] +==== New nodes +The term "new node" refers to nodes that MUST NOT yet exist in the repository.{fn-org327} + +[[reused-nodes, reused nodes]] +==== Replaced nodes +The term "reused node" refers to nodes that are removed and re-added in the same command/event.{fn-org422} + +These [[replace-with-new-content-commands]] _replace with new content commands_ / [[replace-with-new-content-events]] _replace with new content events_ are: + +* <> / <> +* <> / <> + ==== How to address references We refer to references by the tuple of _(parent, reference, index)_. Rationale: Both reference `target` and `resolveInfo` can be `null`, so they aren't suitable for identifying the reference. diff --git a/delta/queries/miscellaneous/ListPartitions.adoc b/delta/queries/miscellaneous/ListPartitions.adoc index 76712f1..09d6850 100644 --- a/delta/queries/miscellaneous/ListPartitions.adoc +++ b/delta/queries/miscellaneous/ListPartitions.adoc @@ -16,11 +16,10 @@ Id of this query. [horizontal] .Response parameters -[[ListPartitions.partitions, `partitions`]]partitions:: <> +[[ListPartitions.partitions, `partitions`]]partitions:: <> All accessible <<{m3}.adoc#partition, Partitions>> in the Repository. -The partitions are sent as complete nodes. -Does NOT include any children or annotations of the root partition nodes. -Does NOT include <<{m3}.adoc#Language, Languages>> or partition children/annotations. + +[[ListPartitions.split, `split`]]split:: <> [[ListPartitions.responseQueryId, `queryId`]]queryId:: <> Id of this query. diff --git a/delta/queries/queries.adoc b/delta/queries/queries.adoc index f6b1aa0..eed901e 100644 --- a/delta/queries/queries.adoc +++ b/delta/queries/queries.adoc @@ -1,6 +1,8 @@ [[queries]] === Queries +include::../continuedChunk/ChunkedQueryResponse.adoc[] + include::subscription/Subscription.adoc[] include::participation/Participation.adoc[] diff --git a/delta/queries/subscription/SubscribeToPartitionContents.adoc b/delta/queries/subscription/SubscribeToPartitionContents.adoc index c3b1ef0..0248bd9 100644 --- a/delta/queries/subscription/SubscribeToPartitionContents.adoc +++ b/delta/queries/subscription/SubscribeToPartitionContents.adoc @@ -21,6 +21,8 @@ Id of this query. [[SubscribeToPartitionContents.contents, `contents`]]contents:: <> Complete contents of <>, i.e. the node with id <> and all of its descendants (including annotation instances). +[[SubscribeToPartitionContents.split, `split`]]split:: <> + [[SubscribeToPartitionContents.responseQueryId, `queryId`]]queryId:: <> Id of this query. diff --git a/delta/scenarios/scenarios.adoc b/delta/scenarios/scenarios.adoc index d2932e8..55112cc 100644 --- a/delta/scenarios/scenarios.adoc +++ b/delta/scenarios/scenarios.adoc @@ -18,4 +18,6 @@ include::repositoryBug.adoc[] include::concurrentChangeLocalUpdate.adoc[] -include::concurrentChangeRemoteUpdate.adoc[] \ No newline at end of file +include::concurrentChangeRemoteUpdate.adoc[] + +include::splitQueryResponse.adoc[] \ No newline at end of file diff --git a/delta/scenarios/splitQueryResponse.adoc b/delta/scenarios/splitQueryResponse.adoc new file mode 100644 index 0000000..88bf3dd --- /dev/null +++ b/delta/scenarios/splitQueryResponse.adoc @@ -0,0 +1,61 @@ +=== Split query response +[plantuml,splitQueryResponse,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Queries as clientQuery +end box + +box "Repository" + participant Queries as repoQuery + participant Core as core +end box + +== Client A connected with participation id "participation-a" == + +[->> clientQuery +activate clientQuery +clientQuery -> repoQuery ++: subscribePartition("partition-id", "qry-1") + repoQuery -> core ++: retrieveDescendants("partition-id") + return + +repoQuery -->> clientQuery: content: [partitionNode, nodeA]\nqueryId: "qry-1"\nsplit: true +activate clientQuery +clientQuery -> clientQuery: bufferPartialResponse +deactivate clientQuery + +repoQuery -->> clientQuery: ChunkedQueryResponse \n chunk:[nodeB]\n continuedChunkCompleted: false\n continuedChunkSequenceNumber: 0\n queryId: "qry-1" +activate clientQuery +clientQuery -> clientQuery: bufferPartialResponse +deactivate clientQuery + +repoQuery -->> clientQuery: ChunkedQueryResponse \n chunk:[nodeC, annotationD]\n continuedChunkCompleted: true\n continuedChunkSequenceNumber: 1\n queryId: "qry-1" +deactivate repoQuery +activate clientQuery +clientQuery -> clientQuery: composeResponse +deactivate clientQuery + +clientQuery -> editor +deactivate clientQuery +activate editor +editor -> editor: draw(nodeA, nodeB, nodeC) +---- +1. Client knows the relevant partition, wants to subscribe. +2. Client sends <> query with partition node id `partition-id`. +3. Repository retrieves all contents of partition with node id `partition-id`. +4. Repository found contents. +5. Repository responds to query with id `qry-1` with contents of 2 nodes: `partitionNode`, `nodeA` (details omitted). +Repository decided the response is too big, and splits it up (`split: true`). +6. Client receives split query result and buffers partial response. +7. Repository continues its response to query with id `qry-1` with another <> with chunk of 1 node: `nodeB` (details omitted). +This is the first in the sequence of chunked responses (`continuedChunkSequenceNumber: 0`) and there will be another response (`continuedChunkCompleted: false`). +8. Client receives the next split query result and buffers partial response. +9. Repository continues its response to query with id `qry-1` with another <> with chunk of 2 nodes: `nodeC`, `annotationD` (details omitted). +This is the second in the sequence of chunked responses (`continuedChunkSequenceNumber: 1`) and there will _not_ be another response (`continuedChunkCompleted: true`). +10. Client receives the final next split query result and composes the response. +11. Client forwards information to editor. +12. Client draws `nodeA` and `nodeB`. +`partitionNode` is not drawn, it represents the canvas. diff --git a/shared/issue-footnotes-imported.adoc b/shared/issue-footnotes-imported.adoc index 24d5b5c..4c35fab 100644 --- a/shared/issue-footnotes-imported.adoc +++ b/shared/issue-footnotes-imported.adoc @@ -1,4 +1,4 @@ -:fn-org3: footnote:org3[https://github.com/LionWeb-io/specification/issues/3[Use Cases for Repo Access API #3]] +:fn-org3: footnote:org3[https://github.com/LionWeb-io/specification/issues/3[Use Cases for Repo Access API #3]] :fn-org4: footnote:org4[https://github.com/LionWeb-io/specification/issues/4[If and how to represent ordered / unordered containments in M3 #4]] :fn-org5: footnote:org5[https://github.com/LionWeb-io/specification/issues/5[First-class support of Enums in M3 #5]] :fn-org6: footnote:org6[https://github.com/LionWeb-io/specification/issues/6[How to represent ComputedFeature in M3? #6]] @@ -329,3 +329,17 @@ :fn-org402: footnote:org402[https://github.com/LionWeb-io/specification/issues/402[Representation of empty protocol messages part of delta messages #402]] :fn-org403: footnote:org403[https://github.com/LionWeb-io/specification/issues/403[Incorrect representation of reference in plantuml graph in Delta Repository Access API #403]] :fn-org405: footnote:org405[https://github.com/LionWeb-io/specification/issues/405[Introduce ErrorResponse #405]] +:fn-org408: footnote:org408[https://github.com/LionWeb-io/specification/issues/408[How to handle potentially large delta messages #408]] +:fn-org409: footnote:org409[https://github.com/LionWeb-io/specification/issues/409[Introduce idea of "independent meaningful part of model"? #409]] +:fn-org412: footnote:org412[https://github.com/LionWeb-io/specification/issues/412[lioncore.json: Mismatched child vs. node id `-id-Classifier-features-2024-1` #412]] +:fn-org414: footnote:org414[https://github.com/LionWeb-io/specification/issues/414[Small inconsistency between Bulk and Delta APIs #414]] +:fn-org415: footnote:org415[https://github.com/LionWeb-io/specification/issues/415[Events should have at least 1 origin command (+ unicity of their IDs) #415]] +:fn-org416: footnote:org416[https://github.com/LionWeb-io/specification/issues/416[Replace CompositeCommand by group label? #416]] +:fn-org417: footnote:org417[https://github.com/LionWeb-io/specification/issues/417[AddPartition command should automatically subscribe the sending client to the partition. #417]] +:fn-org418: footnote:org418[https://github.com/LionWeb-io/specification/issues/418[SerializationVersionFormat in Delta Protocol unspecified #418]] +:fn-org419: footnote:org419[https://github.com/LionWeb-io/specification/issues/419[PartitionAddedEvent may be too big #419]] +:fn-org420: footnote:org420[https://github.com/LionWeb-io/specification/issues/420[Clarify CompositeCommand / CompositeEvent semantics #420]] +:fn-org421: footnote:org421[https://github.com/LionWeb-io/specification/issues/421[How do ProtocolMessages of command/event, or queryRequest/queryResponse relate? #421]] +:fn-org422: footnote:org422[https://github.com/LionWeb-io/specification/issues/422[Clarify semantics of Replace (with new content) commands #422]] +:fn-org423: footnote:org423[https://github.com/LionWeb-io/specification/issues/423[Do we need a dedicated eventId? #423]] +:fn-org425: footnote:org425[https://github.com/LionWeb-io/specification/issues/425[Provide partition contents only on explicit request #425]]