Skip to content

Events in delta API #288

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

Draft
wants to merge 80 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
3d05a14
started on delta protocol spec with description of events
Jul 6, 2024
a8ba898
added issue links
Jul 12, 2024
c0463d8
added all variants of moving references
Jul 26, 2024
6475550
added subscription events (more like commands)
Aug 1, 2024
163a274
merged required and optional parameters
Sep 27, 2024
b353e0c
Merge branch 'main' into niko/delta-api-spec
Nov 5, 2024
cb7f6f6
updated issue footnotes
Nov 5, 2024
d4e94de
updated issue footnotes
Nov 5, 2024
4565a02
spelled out all commands and events
Nov 5, 2024
3b5d6e4
moved subscription and free ids to queries
Nov 6, 2024
9733878
added scenario sequence diagrams
Nov 6, 2024
1126027
reformatted messages as sections
Nov 6, 2024
9d08c1a
started on Command - event pairs overview
Nov 7, 2024
fd2b1eb
fix oldContainment -> containment
Nov 7, 2024
381c7cd
more red/blue colors in diagrams
Nov 7, 2024
7d84bea
converted Command - event pairs overview into split table
Nov 7, 2024
343a44f
added annotations to Command - event pairs overview
Nov 7, 2024
f94e155
added references to Command - event pairs overview
Nov 7, 2024
d135562
nicer formatting for parameters
Nov 7, 2024
10a61df
split off command event overview diagrams into separate files
Nov 7, 2024
405348c
split off scenarios into separate files
Nov 7, 2024
9e6261a
added diagram legend to command event overview
Nov 7, 2024
c127dd0
added legend caption
Nov 7, 2024
cba08ff
removed some newlines
Nov 7, 2024
45d4301
added section numbers
Nov 7, 2024
80a5771
unified style, beautification
Nov 7, 2024
16f1034
updated issue footnotes
Nov 7, 2024
a36c485
added introduction, started on description
Nov 7, 2024
2c98f10
moved around subsections of Messages
Nov 8, 2024
2107fc0
added another repository strategy as example
Nov 8, 2024
5a06e7d
added some details to parameter types
Nov 8, 2024
13235c4
added details query parameters
Nov 8, 2024
9bf4c74
started on details for command parameters
Nov 15, 2024
c28632d
added no-op and error event
Nov 15, 2024
d43da3b
wip
Nov 16, 2024
e7cd8f8
deleted movement between annotations and containments, as per #320
Nov 28, 2024
47aebe5
cleaned up and finished existing scenarios
Nov 28, 2024
31fb1fc
added moveAndReplace variants to command/event overview
Jan 16, 2025
d0927cc
turned two diagrams 90 deg
Jan 16, 2025
683c5eb
removed optional parameters from commands
Jan 23, 2025
7385332
added descriptions of MoveAndReplace commands/events
Jan 23, 2025
fa6c07a
added replaced-parameters to MoveAndReplace events
Jan 23, 2025
74a47ee
added command overview table
Jan 23, 2025
12b910d
split up document
Jan 23, 2025
750f58a
added diagrams to commands
Jan 23, 2025
b64ac78
fixed order in command overview
Jan 23, 2025
8d6fcb0
split up document even more
Jan 23, 2025
b10c43c
added more error cases to move commands
Jan 23, 2025
8c75ee2
removed more optional parameters from move commands
Jan 23, 2025
9dc0344
updated issue footnotes
Jan 23, 2025
19154c6
added lots of issue footnotes to delta spec, adjusted text to issue d…
Jan 23, 2025
947e52d
removed outdated open questions
Jan 23, 2025
e7152d7
updated parameter types
Feb 10, 2025
08ad203
removed commandId / originCommands from composite command / event
Feb 28, 2025
36ba520
Schema JSON for Delta Structures
pjmolina Mar 7, 2025
408e5c4
fix typos
pjmolina Mar 10, 2025
9c4d652
fix missing properties in `SerializedNode`
pjmolina Mar 10, 2025
155f456
"definitely" fix
pjmolina Mar 10, 2025
5420517
updated (mainly delta) specs to latest discussions
Mar 23, 2025
403ccd9
fixed serialization spec: JSON objects are comprised of name/value pa…
Mar 28, 2025
9a1b62b
fixed some id / identifier references
Mar 28, 2025
b025eea
updated delta specs to latest discussions
Mar 28, 2025
8969f98
started to update delta JSON schema (wip)
Apr 2, 2025
fc5e33e
completed first version of delta JSON schema
Apr 3, 2025
b73e0dd
fixed formatting
Apr 3, 2025
ab80710
Fixed JSON errors (missing quotes and trailing commas.
joswarmer Apr 3, 2025
eafbb51
Merge remote-tracking branch 'origin/pjmolina/delta-json-schema' into…
joswarmer Apr 3, 2025
892fa26
fixed some schema issues
Apr 3, 2025
42c66bf
consolidated delta json schemata
Apr 4, 2025
b440dad
fixed JSON schema issues, added SignOnRequest.deltaProtocolVersion
Apr 5, 2025
1c21a9a
removed discussion files
Apr 5, 2025
323b6e5
Merge pull request #338 from LionWeb-io/pjmolina/delta-json-schema
enikao Apr 5, 2025
3e6a01d
adjusted technical message names (start uppercase)
Apr 5, 2025
438f78c
renamed partition subscription messages
Apr 5, 2025
c261bbd
answered some open questions
Apr 5, 2025
92c96b7
added SignOn.deltaProtocolVersion
Apr 5, 2025
b8c4109
explained what happens if a client sends a command about an unsubscri…
Apr 5, 2025
6dd7190
updated github issues
Apr 5, 2025
c674cc8
updated github issues
Apr 17, 2025
caaf8f6
updated to latest spec decisions:
Apr 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions bulk/repo-access-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include::../shared/issue-footnotes.adoc[]
:toc: preamble
:toclevels: 2

The bulk API *version 2024.1* is used to store and retrieve nodes in batches at the moment of invocation.{fn-org25}
The bulk API *version 2025.1* is used to store and retrieve nodes in batches at the moment of invocation.{fn-org25}
It is intended for CRUD operations on (larger) sets of nodes.
it is *not* intended as a delta-oriented API that takes "modification commands" as arguments.

Expand Down Expand Up @@ -87,7 +87,7 @@ A repository also MAY disallow re-using previously deleted node ids.
[[client-ids]]
== Client ids
Each <<{arch}.adoc#client, client>> MUST provide a unique _client id_ when connecting to the repository.{fn-org241}
The client id is an <<{serialization}.adoc#id, id>>-compatible string.
The client id is an <<{m3}.adoc#identifiers, identifier>>-compatible string.
A client MAY connect more than once to the same repository at the same time with the same client id.
It is out of scope of LionWeb to guarantee the uniqueness of the client id.
The repository does not apply any uniqueness checks.
Expand Down Expand Up @@ -181,12 +181,12 @@ We call this part of the reponse [[Response.success]]`success` flag.
Besides the main response, the repository can reply each command with zero or more additional [[Response.messages]]`messages`.{fn-org236}
Each message MUST have the following properties:

* [[message.kind]]`kind` is an <<{serialization}.adoc#id, id>>-compatible string identifying the message type.
* [[message.kind]]`kind` is an <<{m3}.adoc#identifiers, identifier>>-compatible string identifying the message type.
Some message kinds are pre-defined in this specification.
A repository MAY reply with other, additional message kinds.
* [[message.message]]`message` is a human-readable string describing the message.
* [[message.data]]`data` is a flat map with arbitrary keys and values.
All values MUST be strings, the keys MUST be <<{serialization}.adoc#id, id>>-compatible.
All values MUST be strings, the keys MUST be <<{m3}.adoc#identifiers, identifier>>-compatible.
A _kind_ might imply presence of specific keys in `data`.

[[message-kinds-global]]
Expand Down Expand Up @@ -220,6 +220,11 @@ A _kind_ might imply presence of specific keys in `data`.
[[apis]]
== Commands

Each _modifying_ command MUST contain a _[[commandId, commmand id]]command id_.{fn-org313}
It has the same format as <<{m3}.adoc#identifiers, node ids>> and must be unique for all changes of this client.

Modifying commands are <<createPartitions>>, <<deletePartitions>>, and <<store>>.

[[listPartitions, listPartitions]]
[[partitions, listPartitions]]
=== listPartitions: List available partitions
Expand Down Expand Up @@ -254,6 +259,8 @@ Nodes MUST use <<unknown-node-ids>>.
==== Parameters
[[createPartitions.nodes]]
`nodes`:: {chunk} containing all nodes we want to add as new partitions.
[[createPartitions.commandId]]
`commandId`:: <<commandId>> of this command.

==== Response
Does not contain a `chunk`.
Expand Down Expand Up @@ -308,6 +315,8 @@ All (transitive) annotations and children become <<orphan, orphans>>.
==== Parameters:
[[deletePartitions.nodeIds]]
`nodeIds`:: List of node ids to delete.
[[deletePartitions.commandId]]
`commandId`:: <<commandId>> of this command.

==== Response
Does not contain a chunk.
Expand Down Expand Up @@ -417,6 +426,8 @@ We do not support different modes.{fn-org230}
==== Parameters
[[store.nodes]]
`nodes`:: {chunk} containing all nodes to store to the repository.
[[store.commandId]]
`commandId`:: <<commandId>> of this command.

==== Semantics
After completing this call, all sent nodes MUST have exactly the sent contents in the repository.
Expand Down
37 changes: 37 additions & 0 deletions delta/commandEventOverview/addAnnotation.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
|
[plantuml, addAnnotation-before, svg]
----
!include commandEventOverviewStyle.puml

class parent

class "previous\nSibling" as previousSibling
class " " as dummy <<h>>
class "next\nSibling" as nextSibling

parent *--> previousSibling: <<annotations>>\n[index - 1]
parent *-[hidden]-> dummy #Blue: <<annotations>>\n[index]
parent *--> nextSibling: <<annotations>>\n[index]
----
|
[plantuml,addAnnotation-after,svg]
----
!include commandEventOverviewStyle.puml

class parent

class "previous\nSibling" as previousSibling
class "newAnnotation:\nRemark" as newAnnotation #LightSkyBlue {
text:String="ok"
}
class "next\nSibling" as nextSibling

class descendant #LightSkyBlue

parent *--> previousSibling: <<annotations>>\n[index - 1]
parent *--> newAnnotation #Blue: <<annotations>>\n[index]
parent *--> nextSibling: <<annotations>>\n[index + 1]

newAnnotation *--> descendant #Blue
previousSibling <.. descendant #Blue
----
37 changes: 37 additions & 0 deletions delta/commandEventOverview/addChild.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
|
[plantuml, addChild-before, svg]
----
!include commandEventOverviewStyle.puml

class parent

class "previous\nSibling" as previousSibling
class " " as newChild<<h>>
class "next\nSibling" as nextSibling

parent *--> previousSibling: containment\n[index - 1]
parent *-[hidden]-> newChild #Blue: containment\n[index]
parent *--> nextSibling: containment\n[index]
----
|
[plantuml, addChild-after, svg]
----
!include commandEventOverviewStyle.puml

class parent

class "previous\nSibling" as previousSibling
class "newChild:Car" as newChild #LightSkyBlue {
length:Integer=19
}
class "next\nSibling" as nextSibling

class descendant #LightSkyBlue

parent *--> previousSibling: containment\n[index - 1]
parent *--> newChild #Blue: containment\n[index]
parent *--> nextSibling: containment\n[index + 1]

newChild *--> descendant #Blue
previousSibling <.. descendant #Blue
----
13 changes: 13 additions & 0 deletions delta/commandEventOverview/addPartition.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
|
_nothing_
|
[plantuml, addPartition, svg]
----
!include commandEventOverviewStyle.puml

class newPartition:Person <<Partition>> #LightSkyBlue {
name: String = "John"
age: Integer = 23
alive: Boolean = true
}
----
17 changes: 17 additions & 0 deletions delta/commandEventOverview/addProperty.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
|
[plantuml, addProperty-before, svg]
----
!include commandEventOverviewStyle.puml

class "node"
----
|
[plantuml, addProperty-after, svg]
----
!include commandEventOverviewStyle.puml

class "node" {
<color: #blue>property = newValue</color>
}
----

30 changes: 30 additions & 0 deletions delta/commandEventOverview/addReference.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
|
[plantuml,addReference-before,svg]
----
!include commandEventOverviewStyle.puml

class parent

class "previous\nEntry" as previousEntry
class newTarget
class "next\nEntry" as nextEntry

parent ..> previousEntry: reference\n[index - 1]
parent .[hidden].> newTarget #Blue: reference\n[index]
parent ..> nextEntry: reference\n[index]
----
|
[plantuml,addReference-after,svg]
----
!include commandEventOverviewStyle.puml

class parent

class "previous\nEntry" as previousEntry
class newTarget
class "next\nEntry" as nextEntry

parent ..> previousEntry: reference\n[index - 1]
parent .[thickness=2].> newTarget #Blue: reference\n[index]\n<color #blue>{new</color>\n<color #blue>ResolveInfo}</color>
parent ..> nextEntry: reference\n[index + 1]
----
22 changes: 22 additions & 0 deletions delta/commandEventOverview/addReferenceResolveInfo.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
|
[plantuml,addReferenceResolveInfo-before,svg]
----
!include commandEventOverviewStyle.puml

class parent

class target

parent ..> target: reference\n[index]\n<color #red>{null}</color>
----
|
[plantuml,addReferenceResolveInfo-after,svg]
----
!include commandEventOverviewStyle.puml

class parent

class target

parent ..> target: reference\n[index]\n<color #blue>{newResolveInfo}</color>
----
24 changes: 24 additions & 0 deletions delta/commandEventOverview/addReferenceTarget.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
|
[plantuml,addReferenceTarget-before,svg]
----
!include commandEventOverviewStyle.puml

class parent

class " " as target<<h>>
class newTarget

parent ..> target: reference\n[index]\n{resolveInfo}
target -[hidden]-> newTarget
----
|
[plantuml,addReferenceTarget-after,svg]
----
!include commandEventOverviewStyle.puml

class parent

class newTarget

parent .[thickness=2].> newTarget #blue: reference\n[index]\n{resolveInfo}
----
14 changes: 14 additions & 0 deletions delta/commandEventOverview/changeClassifier.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
|
[plantuml, changeClassifier-before, svg]
----
!include commandEventOverviewStyle.puml

class "node:<color #red>oldClassifier</color>"
----
|
[plantuml, changeClassifier-after, svg]
----
!include commandEventOverviewStyle.puml

class "node:<color #blue>newClassifier</color>"
----
18 changes: 18 additions & 0 deletions delta/commandEventOverview/changeProperty.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
|
[plantuml, changeProperty-before, svg]
----
!include commandEventOverviewStyle.puml

class "node" {
property = <color #red>oldValue</color>
}
----
|
[plantuml, changeProperty-after, svg]
----
!include commandEventOverviewStyle.puml

class "node" {
property = <color #blue>newValue</color>
}
----
40 changes: 40 additions & 0 deletions delta/commandEventOverview/changeReference.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
|
[plantuml,changeReference-before,svg]
----
!include commandEventOverviewStyle.puml
left to right direction

class parent

class "previous\nEntry" as previousEntry
class "replaced\nTarget" as replacedTarget
class "new\nTarget" as newTarget
class "next\nEntry" as nextEntry

parent ..> previousEntry: reference\n[index - 1]
parent .[thickness=2].> replacedTarget #red: reference\n[index]\n<color #red>{replaced</color>\n<color #red>ResolveInfo}</color>
parent .[hidden].> newTarget: reference\n[index]\n{new\nResolveInfo}
parent ..> nextEntry: reference\n[index + 1]

previousEntry -[hidden]> replacedTarget
----
|
[plantuml, changeReference-after, svg]
----
!include commandEventOverviewStyle.puml
left to right direction

class parent

class "previous\nEntry" as previousEntry
class "replaced\nTarget" as replacedTarget
class "new\nTarget" as newTarget
class "next\nEntry" as nextEntry

parent ..> previousEntry: reference\n[index - 1]
parent .[hidden].> replacedTarget #red: reference\n[index]\n<color #red>{replaced</color>\n<color #red>ResolveInfo}</color>
parent .[thickness=2].> newTarget #blue: reference\n[index]\n<color #blue>{new</color>\n<color #blue>ResolveInfo}</color>
parent ..> nextEntry: reference\n[index + 1]

previousEntry -[hidden]> replacedTarget
----
22 changes: 22 additions & 0 deletions delta/commandEventOverview/changeReferenceResolveInfo.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
|
[plantuml,changeReferenceResolveInfo-before,svg]
----
!include commandEventOverviewStyle.puml

class parent

class target

parent ..> target: reference\n[index]\n<color #red>{oldResolveInfo}</color>
----
|
[plantuml, changeReferenceResolveInfo-after, svg]
----
!include commandEventOverviewStyle.puml

class parent

class target

parent ..> target: reference\n[index]\n<color #blue>{newResolveInfo}</color>
----
26 changes: 26 additions & 0 deletions delta/commandEventOverview/changeReferenceTarget.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
|
[plantuml,changeReferenceTarget-before,svg]
----
!include commandEventOverviewStyle.puml

class parent

class oldTarget
class newTarget

parent .[thickness=2].> oldTarget #red: reference\n[index]\n{resolveInfo}
parent .[hidden].> newTarget
----
|
[plantuml,changeReferenceTarget-after,svg]
----
!include commandEventOverviewStyle.puml

class parent

class oldTarget
class newTarget

parent .[hidden].> oldTarget
parent .[thickness=2].> newTarget #blue: reference\n[index]\n{resolveInfo}
----
Loading