Closed platosha closed 6 days ago
Workflow notes:
Note that every operation result is a custom thenable object.
Edit: Extracted to https://github.com/vaadin/hilla/issues/2712.
Some parts of this issue have been extracted to separate tickets so that the core reliability feature can be implemented more easily:
Note: reusing Flux is not in the scope of this ticket. We assume here that the server has disposed the Flux instance.
For now, let us drop the concept of buffering the outgoing operations. At the same time, we have no guarantee yet on wether the outgoing operations were received by the server or not. We'll come back to this when we have a proper event log.
Buffering operations and making sure they are delivered exactly once is now described in https://github.com/vaadin/hilla/issues/2721.
A signal instance that has subscribers will automatically resynchronize with the server when the client reconnects to the server after having been disconnected. While disconnected, the signal value remains set to the value that was last seen before going losing the connection, supplemented with latency compensation for any pending operations. Pending operations that have been performed while disconnected will be sent to the server when the connection is restored (assuming the same client-side instance is still in active use).
Note that the implementation should also recover from network connectivity issues that cause the connection with the server to be broken even though the browser fires no
offline
andonline
events.