3 ms·
To be CP, your client and the server database have to both view the same consistent data, so your client can't be available if the database isn't available. If
by naasking 9y ago
To be CP, your client and the server database have to both view the same consistent data, so your client can't be available if the database isn't available.
If your client is available even in this case, then you have some kind of eventual consistency.
- aidenn0 9y agoThe article was specifically comparing database software, not entire systems; if your client is available when the DB is unavailable, then you can have an AP system regardless of the design of the database.
- zzzcpan 9y agoCP system is about not working when it is not available, otherwise you have no consistency at all and it is in fact very important to consider the whole system, not only the database part. Eventual consistency lets you fetch and store a tiny view of the database in the client and allows the user to work completely within the local storage, synchronizing with the global storage only when the internet connection is available. Which enables fast and always available user experience.
- ProblemFactory 9y agoI think the argument is that people expect mobile and client-side web apps to continue working offline, and eventually sync and merge changes across clients. So you need a good solution for resolving inconsistent updates made by two offline clients. The same solution could be used for resolving inconsistent updates made on two database servers.
- marknadal 9y agoThis is so beautifully said, I wish I could have been that concise. Thank you for this comment, very well worded. That is exactly what I'm trying to do with my own system, for anybody curious: https://github.com/amark/gun https://github.com/amark/gun (MIT / ZLIB / Apache 2 licensed).
- aidenn0 9y agoOkay, that makes sense.
- naasking 9y ago> So you need a good solution for resolving inconsistent updates made by two offline clients. The same solution could be used for resolving inconsistent updates made on two database servers. Exactly what I was trying to get at, thanks. The line between client state, server state and db state is a thin illusion. As REST makes explicit, every client operates on a representation of some server resources, which means CAP can come into play in even the most trivial online apps.
- deleted 9y ago[deleted]