The Journey to Distributed Systems: Part 1 — Intro

Williams Adu
The Andela Way
Published in
3 min readJul 31, 2019
Photo by Banter Snaps on Unsplash

I hope I don’t over excite you too much by discussing distributed systems. Generally, it is a very interesting concept and one that has been embraced by most in general. For starters, distributed systems are the opposite of a centralized system. What do we mean? Hmm, let’s go through each from a high level.

A centralized system is one where the state and the program are stored on a single computer. For example, imagine taking notes using Microsoft Word. Word would store the document in memory and periodically save the document on disk. But what if the computer breaks, disaster strikes! Most often, we lose everything unless we can somehow restore from a backup. In contrast, a distributed system stores the state over multiple computers. So back to our example, instead of Word saving the document locally, you save in Dropbox. Using this approach, if the computer breaks, you only borrow a friend's computer and you are back to business. Yippee!! This is what we call fault tolerance. You are taking advantage of all the computers that Dropbox has. Isn’t it awesome? Though the idea of Dropbox appears as one computer to its users, it is essentially a collection of independent computers working together in a distributed fashion.

Wait! Are we saying centralized systems are bad? NO!!! They are very simple at the core i.e. you only have one computer to manage. They can be faster for a single user because there are no network roundtrips. In contrast, a distributed system can be more reliable. If one breaks down, you are not doomed. It can also be more scalable. Wait again! Managing multiple computers can be complex and we know it… Complexity is mostly not a good thing. No wonder, distributed systems are considered an advanced topic in computer science. Nonetheless, if there is a real use case, their use can be so amazing.

What are some of the use cases for distributed systems? Think of DNS (Domain Name System). This is a lookup table of hostnames to IP addresses. Imagine the case of a central lookup table for all hostnames and IP addresses? What if that central source cracks down? Actually, DNS is implemented as a distributed system to ensure the availability of websites and smooth browsing of the internet.

Generally, we can categorize distributed systems applications under different use cases. One such use case is when the very nature of an application may require the use of a communication network that connects several computers. An example is when data produced in one physical location is required in another location. Another use case is when the use of a single computer would be possible in principle, but the use of a distributed system is beneficial for practical reasons.

Characteristics of a Distributed System

How do I identify a distributed system? Well, it is easy. Generally, its a group of systems operating together as one. All participating computers share or pool resources. The most common resource that is shared is data. This is to ensure consistency across the various machines.

Secondly, since we have more than one computer, we can assume that they all run concurrently. Isn’t that a good thing? For starters yes. It means that we can do concurrent jobs taking advantage of the computers in the distributed system. But wait! Does that not mean they can also fail independently? Well, we can’t trust computers and network connections either.

Finally, one major characteristic to note is that computers do not share a global clock. Since there are many computers on different computers in a distributed system, there are many clocks. But it should be noted that these aren’t precisely in sync. This is something to note if we are considering to do things in sync or are looking for ways to generate globally unique identifiers across our distributed system.

Summary

Whew! The common truth is that distributed systems are everywhere today. Lots of people are finding interesting use cases for them. I hope the following blogs contribute to some knowledge as you explore the concept.

In Part 2, we explore the CAP theorem.

--

--