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:
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.
A system is consistent when it is able to return the latest data immediately after creation/modification.
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…
Software engineer passionate about technology, teaching and management