Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> /changes lists all the IDs that might have changed.

How does it do this in a distributed setting? When clients might be connecting to multiple servers with different states?



Well, it depends on how you architect your system - you can embed whatever you like in your state. I'd probably do something cheap and nasty like embed a modseq counter for each of the different servers into the state string, and if any of them went backwards I'd reject the /changes with a cannotCalculateChanges error.

I mean, you can do other things - but at the point where you're switching between multiple masters in a split brain from your client, all bets are off - so you're going to need to fall back resyncing any mutable data.


> but at the point where you're switching between multiple masters in a split brain from your client, all bets are off

CRDTs handle split brain fine. They eventually converge. You just don't want your clients flapping in the meantime by resyncing tons of data. That's where a distributed sync algorithm would help keep things working in the interim.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: