CAP theorem

Hello everybody,

today I started new course at pluralsight.com, which is entitled "Patterns for Building Distributed Systems for The Enterprise". 

Andd I started watching CAP theorem. CAP theorem is actually abbreviation of four words: 

Consistensy

Availabilty

Partition tollerance.

I don't know how about you, but I'm pretty happy that it is called CAP theorem, not CAPT theorem, because CAP sounds more pleasant. Sometime it is also named Brewer's theorem. Now lets go to theorem by itself. 

It claims that among three ( C A or P ) your system always will be able to provide only two. And looks like you'll not be able to always affect which of three your clients will get.

And reasons why this can happen can be the following ( not a full list )

1. Network is not reliable

2. Latency in network

3. Limitation of bandwitdth

4. Security issues with data

5. Topology can change

6. Plenty of administrators

7. Transport cost is not zero

8. The network is not homogeneous.

After reading of this, you maybe can decide what to do with this? Maybe you should refuse from working with distributed computing? Well, that not nesessary bad idea. In CQRS Journey there is first law of distributed computing: "Don't distribute".

But what to do, if you want? Well, if you want and there is somebody who is ready to pay your desire, then all what you can do, is to handle each of CAP failing.

No Comments

Add a Comment