Techniques/algorithms for syncing between multiple client and server
So I've been using pouchdb as a kind of client/server sync, but I want to start transitioning away from it for various reasons.
I want the (single) server to be the master and the clients to be slaves. So multi-master architecture is not needed - which AFAIK makes a whole lot of things easier.
Is there some general techniques/algorithms I should be looking at? Maybe a well known algorithm in the distributed systems field? I mean I can think of a bunch of edge cases myself but I want to do this properly.
Posted Mar 10, 2019, 7:39 PM UTC
What are you syncing and why? What's the minimal amount of syncing you really need? Have you considered Firebase or services that claim to be similar? Or even Dropbox?
From working on and near projects that sync data with a custom solution, syncing algorithms (or distributed algorithms in general) can be very complicated to get right and you should avoid coding this yourself whenever possible. There's endless edge cases and when things go wrong (i.e. data loss) it takes a lot of effort to figure out where the problem is and to know for sure you've fixed it.