ACID vs CAP: What's the difference?
ACID properties and the CAP theorem - What follows is a primer on the two concepts and an explanation of the differences between the two "C"s.

#dc comics#dc#batman#bruce wayne#dick grayson#tim drake#dc fanart#batfamily#batfam





seen from United States

seen from Norway
seen from United States

seen from United States
seen from Russia

seen from India

seen from Australia

seen from United States

seen from United States
seen from United States

seen from T1
seen from France

seen from India
seen from T1
seen from Malaysia
seen from United States
seen from United States
seen from Uzbekistan

seen from Saudi Arabia
seen from T1
ACID vs CAP: What's the difference?
ACID properties and the CAP theorem - What follows is a primer on the two concepts and an explanation of the differences between the two "C"s.
Consciousness and the CAP theorem: I think there's some connections to be made between questions like
"why does our conscious mind typically seem to be one thing rather than multiple independent things at the same time?" or
"why do we seem to never be able to have two independent simultaneous thought processes?"
and the study of consistency/synchronization in distributed systems.
Like, maybe it's just necessarily the case that parallel independent streams of thought are irreconcilable (or at least much more complicated-to-reconcile) in the moment like that. Maybe functional consciousness inherently implies or requires a kind of coherence, an integration and coordination of cognition into a sensible whole. Like maybe a brain can execute two independent streams of thought just fine, but independence is inherently incompatible with being within one conscious experience.
ACID Vs BASE for Database Transactions
ACID Vs BASE for Database Transactions
In the previous post, you have learned about the ACID and BASE properties of database transactions in detail.
Here you will know about high-level differences between ACID and BASE.
ACID BASEProvides Vertical Scaling Provides Horizontal Scaling Strong Consistency Weak Consistency – Stale Data OK Isolation Last Write Wins, availability first Transaction Programmer…
View On WordPress
SQL vs NoSQL
In this post you will know about the main high level difference between SQL and NoSQL type databases.
SQL vs NoSQL SQL NoSQLRelational Type Non-Relational Type Structured Data Stored in Tables The un-structured data store in JSON format in file but graph of database show relationship. Strict Schema Dynamic Schema Vertical Scalable Horizontal Scalable Structured Query Language Un-structured…
View On WordPress
BASE Properties for Distributed Database Transactions
BASE Properties for Distributed Database Transactions
In the previous post, you have learned about ACID properties of the database transactions for traditional databases. As transactions are growing over the internet, systems are scalable and distributed. In some of the systems where availability is more important than the consistency.
For Example, Amazon, eBay, etc.
For such types of systems in 2000, Eric Brewer’s introduce a theorem that’s called
View On WordPress
CAP Theorem
Now a days, most of the enterprise based applications are distributed (a collection of interconnected nodes that shared data) over the internet/cloud so that increases the availability of systems. As the application grows and in terms of users and transactions counts and required persistence than big concern is database scalability.
After considering such facts In the year 2000, Eric Brewerdevel…
View On WordPress
IMHO, the following can't be emphasized enough "An important lesson from this is that consistency doesn’t come for free! You have to be willing to pay the price in availability, and so if you’re going to be using a strongly consistent system it’s important to make sure that’s something you actually need." (also, kudos to them for not reinventing the wheel :-) #DistributedComputing
Understanding CAP theorem and Eventual Consistency.
Most of the people working in the Big Data world have at least heard about the CAP theorem. But many of them don't fully understand C A and P meaning and what complexity skipping each of this would bring (and theorem says that you can't have all 3 together). To make things worse, Eventual Consistency came into picture along with the CAP theorem. And the problem is that Eventual Consistency is NOT the C from the CAP. Let me try to explain all of this.
Before starting, I must say that I am mathematician. And one of the problems I see with the CAP theorem is that I never saw it properly defined. CAP itself is very simple – you can only have two of three: CA, CP or AP. But I never saw a clear definition of the C, A and P. There are different examples, words like “its clearly seen”. And from my university times I know that when someone use this words, it means that nothing is clear. So, let's try to define the terms and define them correctly. By correctly I mean that I will try to provide clear criterias that would tell if given system has C, A or P.
Let's start with the Partition Tolerance. This is the most clear and easy one. System is Partition Tolerant if it can resolve Partitioning situation automatically one way of another. CA systems are rare and require application or operator help resolving data conflicts after partitions merge.
Next term is Availability. Can any system be universally available 100% of time. No, it can't. It can be down even if the SLAs are 9.9999999.... There is still a chance system will be down. So, what is the CAP theorem's Availability? In my understanding, availability means that as soon as you have established system connectivity, you can use the system. That simple. Let's check what it means to all 3 system types:
CP systems would not be available as soon as they detect possible split brain scenario scenario. Usually they can only tolerate minority of servers being down. As soon as half is down, the whole system does not work. You may still have the server you are connected to up and runnings, but it should refuse your requests.
CA systems would accept your requests, but would have problems during data merge after partitioning is resolved. Often such systems would ask for application help to resolve possible data conflicts.
AP systems would automatically resolve the conflicts in some standard way, often with some timestamping. They are easier to use but you must be sure you understand (and better test) all the caveats of the automatic conflict resolution.
Last term, Consistency is the toughest one. First thing you should understand, it's not about locking or concurrency. Even Consistent system may have problems implementing parallel counter increase. Secondly, it's not about atomic updates. Even in a Consistent system, list of multiple writes may fail at some step, leaving you with a inconsistent data on a high level (and there are ways to handle this). Actually, this is the reason I don't like the term. I'd prefer the theorem to be GAP. Think of Consistency as of Guaranty. To be Consistent system must Guaranty you that as soon as data is successfully written, client would (with respect to caching policy) see it or get an error. Again, system can't guaranty you 100% availability, but it should give you your data or tell you it's (possibly temporarily) lost.
And here we came directly into Eventual Consistency world. In this world, first of all I want to separate two things: caching and eventual consistency per se. Clustered systems often provide you with some sort of read data cache to speed things up. E.g. Apache Zookeeper, a brilliant synchronization service, is a CP system even though other clients may not see the data immediately because of followers state (that is essentially a cache) synchronization. But if the quorum is lost, it would be detected very soon and all the clients would be disconnected.
Another story are AP systems, e.g. Apache Cassandra in AP mode (for Cassandra you can select the mode for each operation). It provides you with the Eventual Consistency, any your write will be propagated to the clients... unless the server holding the write would fail. The primary difference to plain caching is that your application would not notice that data is lost. And in case of permanent loss (hardware server failure) it's usually hard enough to say what exactly was lost in a AP system. You lost “Data or Failure” guaranty and that is why this mode is not considered Consistent.
So, in summary, here are the questions you need to ask to see if given system has C, A or P:
Partition Tolerance: Would the system need any application help to resolve data merging conflicts?
Availability: Would I be always able to use the system if I have running server connectivity?
Consistency: Would my application know fast if some data is (possibly temporary) lost?