-
Couldn't load subscription status.
- 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
…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.
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.
…ion command classes for better validation and robustness.
…ing immutability and consistent field annotations.
…o `@NotNull` and introducing additional null checks for `parent` and `reference` fields.
…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.
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.