-
Notifications
You must be signed in to change notification settings - Fork 3
Initial Delta Support #272
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?
Conversation
Code Coverage
|
client/src/main/java/io/lionweb/client/delta/messages/commands/annotations/AddAnnotation.java
Show resolved
Hide resolved
client/src/main/java/io/lionweb/client/delta/messages/commands/annotations/AddAnnotation.java
Outdated
Show resolved
Hide resolved
client/src/main/java/io/lionweb/client/delta/messages/queries/partitcipations/Reconnect.java
Outdated
Show resolved
Hide resolved
client/src/main/java/io/lionweb/client/delta/messages/CommonDeltaEvent.java
Outdated
Show resolved
Hide resolved
client/src/main/java/io/lionweb/client/delta/messages/DeltaCommandResponse.java
Outdated
Show resolved
Hide resolved
client/src/main/java/io/lionweb/client/delta/messages/DeltaQueryResponse.java
Outdated
Show resolved
Hide resolved
| import java.util.function.Function; | ||
| import org.jetbrains.annotations.Nullable; | ||
|
|
||
| public class InMemoryDeltaChannel implements DeltaChannel { |
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.
When implementing C#, I first thought it would be very nice for debugging to have both the client and the server in the same process. It turned out to be very confusing, as we have several instances of the same node (with the same id) to handle.
To me, it now feels more convenient to have them in separate processes.
YMMV, just sharing some pain (-:
| "Node with id " + changeProperty.node + " not found"); | ||
| } | ||
| SerializedClassifierInstance node = retrieved.get(0); | ||
| String oldValue = node.getPropertyValue(((ChangeProperty) command).property); |
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.
I tried to separate the protocol handling from applying the deltas to a local model, and this turned out to be helpful: In our project, we're actually not using the repository, but recording all deltas on one side, sending them to the other side, and apply them there. We can reuse all the logic written for repository.
5e49383 to
a6d52fc
Compare
6d00dd1 to
5add807
Compare
…ty`, `DeleteProperty`, etc.), queries (`SignOn`, `SubscribeToPartitionContents`, etc.), events (`PropertyAdded`), and supporting classes (`DeltaChannel`, `DeltaProtocolVersion`).
…place references, annotations, and children, covering various parent and containment scenarios with documentation updates and null checks.
…cross and within references, refactor existing commands to use `final` fields for immutability.
…, and move operations across references, with immutability improvements and comprehensive documentation updates.
…n, and general events, enhancing immutability and adding comprehensive documentation.
…` and `Reconnect` classes, and improve structure for queries and subscriptions.
… for properties, including tests, new utility methods in `ClassifierInstanceUtils`, and `InMemoryDeltaChannel` implementation.
…nt` and refactor tests for client-server synchronization.
…h new `DeltaCommandReceiver` interface, including server-side partition and property synchronization enhancements.
…nd consistency; optimize formatting and remove unused imports.
…taCommandResponse` with acceptance and rejection support.
…InMemoryServer` for simplification and cleanup.
…g convention and add corresponding `Response` classes with null safety improvements and validations.
…nt event classes for consistency and introducing abstract enforcement for standardized behavior.
…g, removing classes and methods related to command responses and adding standardized error codes for improved error propagation and diagnostics.
…cross server, client, and model layers, introducing indexed child insertion functionality and associated validations.
…`, introduce `DeltaQueryReceiver` and query response flow, and enhance `DeltaClient` and `InMemoryDeltaChannel` for synchronized command and query handling.
…ent, enabling child removal across server, client, and model layers, with accompanying tests and validations.
…ies (`Enumeration`, `DataType`, `EnumerationLiteral`, etc.), refactor initialization logic for improved safety and consistency, and update related tests for validation.
…ference` DeltaCommand and `ReferenceAdded` DeltaEvent, update partition observers for index handling, and enhance `Enumeration` initialization with `id` constructor overloads.
…st`, reintroducing features with consistent `Property` constructors and modern `LionCoreBuiltins` string type assignment.
…ink` classes, refactor containments and properties initialization in `DeltaClientAndServerTest` for consistency and modern type usage.
…r tests for consistent property and containment initialization, and reintroduce regular references in `DeltaClientAndServerTest`.
… reintroduce test case comments in `DeltaClientAndServerTest`, and modernize enumeration literal handling with `id` constructor overloads.
…tion and reintroduce commented test cases in `DeltaClientAndServerTest` after updates for improved consistency and readability.
…Reference`, `Link`, `EnumerationLiteral`, `DataType`, etc.) and clean up related initialization logic for improved maintainability.
… `id` constructor overloads, streamline metamodel and test setup for improved consistency.
…lue` declaration in `HasFeatureValues` to simplify interface and improve clarity.
5add807 to
fbddd8e
Compare
With this PR we setup the infrastructure to support the delta protocol.
This is intended to collect early feedback before implementing support for other commands and events.
Only then we will implement the DeltaChannel that actually exchanges messages through WebSockets.
In preparation for this we extracted the PRs #274 #275 #276 and #277