Protobuf is a binary message format crafted by Google and is efficient compared to other message formats like JSON & XML.

But why is Protobuf efficient? Is it a better option to move to Protobuf from JSON/XML messaging formats? To answer these questions lets dive deep into Protobuf and understand its working principle.

We all know about JSON, the most popular messaging format for transferring messages in web applications. JSON is human readable, efficient compared to XML and easy to work with. JSON is also supported natively on backend frameworks like NodeJS and client applications like Chrome. …

CAP theorem states that it is impossible for a distributed datastore to simultaneously provide more than two out of the following three guarantees:

  • Consistency (C)
  • Availability (A)
  • Partition tolerance (P)

But what is Consistency, Availability & Partition tolerance? How does it help us to architect better systems? Let’s find out the answers to these questions.

Consistency (C)

A system is consistent when it is able to return the latest data immediately after creation/modification.

Consistent System
Consistent System
Consistent System

In the architecture below, we have 3 databases — one primary and 2 replicas. All writes go to the primary database and synchronously replicated to all replicas. Replicas are…

In computer science, consistent hashing is a special kind of hashing such that when a hash table is resized, only n/m keys need to be remapped on average where n is the number of keys and m is the number of slots

That is Wikipedia definition of consistent hashing! Firstly, who understands Wikipedia definitions? Not many right? So let’s try to break open the definition and see what’s there for us to learn.

Let’s say we want to create a social media website that allow users to share posts. Let’s keep the post as a simple message for now. So…

Swaminathan Muthuveerappan

Software engineer passionate about technology, teaching and management

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