Skip to content
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

Make acid-state useable as a mobile/web app state synchronization library #81

Open
alexanderkjeldaas opened this issue Jan 25, 2017 · 0 comments
Labels

Comments

@alexanderkjeldaas
Copy link

Consider the problem of a distributed chat system:

A accounts/users, C client connections, X chat channels.

The state in the X chat channels is large, and we don't want to keep it all on the clients. For clients that have multiple connections, we want the account state to be in sync.

Now imagine that we use event sourcing as an architecture. Thus each client will send mutation events to a server for processing.

This is quite similar to the acid-state remote setup, and without knowing too much about acid-state, there might be some differences:

  1. For each update received by a server, multiple (remote client) states should be updated, and some async queueing to handle how to do the updates for partially connected clients.
  2. A client might want to choose between replaying updates, receiving a serialized copy of the full state, or doing a remote query, in order to access the current state.
  3. It seems like the machinery to serialize queries, data structures, and updates is already in acid-state.

Some problems:

  1. acid-state depends on network which is incompatible with GHCJS. We are using GHCJS extensively for mobile development, and this makes acid-state unsuitable.
  2. I am not sure if I want to use acid-state as a storage mechanism on the server itself - maybe I want to use postgres or something else. I don't know if there is a nice way of transforming acid-state updates to postgres updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants