MediumSynchronous Communication. Day 17 | by Rabius Sani Jabiullah | Medium
Sitemap

Synchronous Communication

2 min readApr 6, 2024

--

Day 17

Alright, friends! Today, we’re taking a little distance from our usual database topics and delving into something simpler yet crucial. Let’s start things off with a relatable scenario: Imagine you are feeling hungry and decide to grab lunch at a nearby restaurant. But here’s the catch— you are out of cash. So, what’s the plan? Well, it’s pretty straightforward: you need to swing by the ATM first, withdraw some cash, and then head to the restaurant for your meal. That makes sense, right? Now, here’s the kicker: Can you just stroll into the restaurant without grabbing cash from the ATM? Nope, that’s a big no-no. This scenario perfectly illustrates synchronous communication, where each step relies on the completion of the previous one.

Here’s a simpler breakdown for you:

  1. Grab information from the database.
  2. Modify the information if required.
  3. Pop the modified data back into the database.

And guess what? It’s a non-stop cycle! These steps happen one after the other, all in a synchronous manner. So what are the use cases of synchronous communication?

Get Rabius Sani Jabiullah’s stories in your inbox

Join Medium for free to get updates from this writer.

a. In Transactions.

b. Achieving high-level consistency.

During Distributed Services, maintaining synchronous communications is necessary for consistency.

Imagine we have two replicas of our databases, in our system. Now, let’s say a user makes a change to one row in our database. However, one of our replicas doesn’t get updated at all. This happens because we didn’t ensure synchronous communication in our system. As a result, we face the risk of retrieving incorrect data from our system, leading to inconsistencies.

Typically, industries like the stock market, banking transactions, and ticket booking systems rely heavily on synchronous communication.

Alright friends, that wraps up our exploration for today! Tomorrow, get ready for an exciting journey as we dive into a question that’s always buzzing around in system design interviews. We’ll explore it from every angle possible.

Take care until then! Bye for now.

--

--

Rabius Sani Jabiullah
Rabius Sani Jabiullah

Written by Rabius Sani Jabiullah

I love working in HCI and mobile application development, aiming to innovate solutions that address pressing end-user challenges.