Hacker News new | ask | show | jobs
by throwaway_bad 2446 days ago
This looks like a pretty naive solution.

The more elegant way to do optimistic UI would be to use CRDT or OT.

Usually syncing is talked about in the context of syncing multiple clients. Here, we just want to sync the cached offline state with the server state. This allows you to make arbitrary changes to your offline state even if your server has conflicting changes incoming, it will all be eventually consistent in the end.

I would love to see a blog post about that! (the only way I know how to implement it cleanly is using pouchdb)

1 comments

CRDT: Conflict-free Replicated Data Type OT: Operational Transform