News for hackers. Stuff that matters.
Re:CAP: Don't settle for eventual consistency by aidenn0 on Wednesday June 28, 2017 @03:37PM (#14657510)
If your client has to work when the database isn't available anyways, then isn't that an even stronger argument for a CP database?
Re:CAP: Don't settle for eventual consistency by naasking on Wednesday June 28, 2017 @03:42PM (#14657552)
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.

Re:CAP: Don't settle for eventual consistency by aidenn0 on Wednesday June 28, 2017 @03:48PM (#14657596)
The 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.
Re:CAP: Don't settle for eventual consistency by ProblemFactory on Wednesday June 28, 2017 @04:20PM (#14657936)
I 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.
Re:CAP: Don't settle for eventual consistency by naasking on Wednesday June 28, 2017 @07:38PM (#14659555)
> 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.

Re:CAP: Don't settle for eventual consistency by marknadal on Wednesday June 28, 2017 @04:35PM (#14658110)
This 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 (MIT / ZLIB / Apache 2 licensed).
Re:CAP: Don't settle for eventual consistency by aidenn0 on Wednesday June 28, 2017 @04:58PM (#14658325)
Okay, that makes sense.
Re:CAP: Don't settle for eventual consistency by zzzcpan on Wednesday June 28, 2017 @04:00PM (#14657716)
CP 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.