4 ms·
I have a new definition: * CP is a database * AP is a cache Anyone else pretending AP is a database is lying (unless it's a content-addressable store) :p
by zimbatm 9y ago
I have a new definition:
* CP is a database
* AP is a cache
Anyone else pretending AP is a database is lying (unless it's a content-addressable store) :p
- jedberg 9y agoCasandra and Riak are AP, and both can certainly be used as sources of truth. You just have to move the "C" part up into your app, which may actually be a better place for it, since what is "consistent" can be dependent on the data and application of that data.
- irfansharif 9y agoHere is what Google has to say about 'moving the "C" part up into your application': “We also have a lot of experience with eventual consistency systems at Google. In all such systems, we find developers spend a significant fraction of their time building extremely complex and error-prone mechanisms to cope with eventual consistency and handle data that may be out of date. We think this is an unacceptable burden to place on developers and that consistency problems should be solved at the database level.”[1] [1]: https://yokota.blog/2017/02/17/dont-settle-for-eventual-consistency https://yokota.blog/2017/02/17/dont-settle-for-eventual-cons...
- hodgesrm 9y agoThere's a quote from _Transaction Processing_ by Gray and Reuter about ACID transactions that is quite relevant to eventual consistency: "Without transactions, distributed systems cannot be made to work for typical real-life applications." This is as true now as it was 25 years ago, for exactly the reasons cited by Google. The book is incidentally still a good read.
- zeckalpha 9y agoTransactions are related to atomicity, not consistency. There are atomic AP systems with transactions but without consistency.
- zimbatm 9y agoJust :) Dealing with merge conflicts is not trivial. So far I know of three different strategies: Automatic with CRDTs, but there is a price to pay in storage and available data-structures to play with. Manual, like Git. Denial, aka. Last Write Wins. With is probably good enough for a cache but has been used in other context.
- urethrafranklin 9y agoRiak is configurable. It can be used as CP.
- d_t_w 9y agoI have a system which computes over an immutable time series and stores the results in Cassandra, which I treat as the source of truth. I think it's fair to call it a DB.
- zimbatm 9y agoWhat is the merge strategy after a partition? The initial comment was mainly intended as a joke since a lot of AP systems use the last-write-wins strategy.
- d_t_w 9y agoCassandra has a range of anti-entropy repair processes that run periodically, that's broadly speaking enough in my case. I don't require last-write-wins. It's an immutable time series with no updates, no deletes.