Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cassandra Design Patterns

You're reading from   Cassandra Design Patterns Build real-world, industry-strength data storage solutions with time-tested design methodologies using Cassandra

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785285707
Length 168 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rajanarayanan Thottuvaikkatumana Rajanarayanan Thottuvaikkatumana
Author Profile Icon Rajanarayanan Thottuvaikkatumana
Rajanarayanan Thottuvaikkatumana
Arrow right icon
View More author details
Toc

Chapter 4. CAP Patterns

 

"Your Coffee Shop Doesn't Use Two-Phase Commit"

 
 --Gregor Hohpe

Those who have worked on database applications will be familiar with two-phase commit. Whenever there are multiple application elements or components in a distributed system, there are two phases in order to perform an atomic transaction. In the first phase, all the participating components have to say "yes" for the transaction. If all of them say "yes," then in the second phase the changes have to be committed, which completes the transaction. This is an oversimplified description of the two-phase commit.

Note

A transaction is said to be atomic if it cannot be divided further. There is another way to interpret this: If there are multiple steps in a given transaction, either all the steps complete successfully, or none of them completes.

Even if the systems are distributed, if the number of components is very small, a two-phase commit doesn&apos...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image