dsp-api
dsp-api copied to clipboard
Add support for offline client synchronization
This feature comes up from time to time and should probably get addressed at some point in time. Here it serves a reminder and a place where possible implementation architectures can be discussed.
Here is a video describing a solution to a very similar problem using akka-persistence and event logging: https://youtu.be/98KuloQJQFM
In their case, they have a client web-application used in offline mode, which locally stores all commands (actions) and events (results of actions) the user performs in an event log, while the GUI is updated as if those changes were done online. They are using Redux (https://redux.js.org) on the client side for storing the application state. So any changes to the state through commands is reflected in the GUI.
To synchronize the changes back to the server, the client's event log is appended to the server's event log and replayed.
A good talk providing a general overview on event sourcing: https://youtu.be/rUDN40rdly8
And of course, Jonas Bonér (inventor of Akka) has a talk about event-driven architecture: https://youtu.be/1hwuWmMNT4c