I Got 99 Problems and a Distributed Database Ain’t One

Understanding the basics of distributed database systems and their limitations

Image for post
Image for post
A famous rapper in a quest for stepping up his database game

CAP Theorem

Image for post
Image for post
Simplistic distributed database system facing a network partition
Image for post
Image for post

PACELC Theorem

Image for post
Image for post
PACELC is an extension of CAP that states additional tradeoffs between latency and consistency

Consistency and Isolation levels

+----+------------+
| id | username |
+----+------------+
| 1 | Betty |
| 2 | McSwinster |
+----+------------+
BEGIN TRANSACTION;
SELECT username FROM users;
WAITFOR DELAY '00:01:00'
SELECT username FROM users;
COMMIT;

Read uncommitted

Read committed

Repeatable reads

Serializable

Consolidated Learning: Replication with PostgreSQL

Conclusion

Written by

Timezones will be hard to manage once we get on Mars.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store