Distributed Applications overview

The agenda of this post to discuss the following:

  1. What is a distributed application?
  2. Why do we need distributed applications?
  3. Characteristics of distributed applications.
  4. Challenges in building a distributed application.

1. What is a distributed application/system?
There are many definitions of distributed application. They all mean exactly the same thing. Some of the definitions are as listed below:

A distributed application is software that is executed or run on multiple computers within a network. These applications interact in order to achieve a specific goal or task. Traditional applications relied on a single system to run them.” – https://www.techopedia.com/definition/23971/distributed-application

Distributed applications (distributed apps) are applications or software that runs on multiple computers within a network at the same time and can be stored on servers or with cloud computing. Unlike traditional applications that run on a single system, distributed applications run on multiple systems simultaneously for a single task or job.” – http://searchcloudcomputing.techtarget.com/definition/distributed-applications-distributed-apps

2. Why do we need distributed applications?
From the above definition, we have understood that distributed applications run on multiple computers (as opposed to a single machine). Obviously these processes are more likely independent processes that are running together to achieve one larger common task. The advantages to this type of computing is that you’ll design your component in such a way that they are independent of each other and can run on a cluster, taking the advantage of processing them in parallel.

3. Characteristics of distributed applications.
Distributed applications are likely to have the following characteristics:

  • They will be sharing resources.
  • They will be accessed concurrently by huge number of users.
  • They will be distributed across cluster of servers.
  • The servers in a distributed setting will need to talk to each other.
  • They need to tolerant to failures and should be able to recover with least human intervention.
  • The distributed application could have a typical master-worker architecture.

4. Challenges in building a robust distributed application
As we now know the characteristics of distributed application. We can think about so many things that can become a challenge in building a robust application.

  • Servers/processes are bound to go down in a cluster, no matter what you do 😦
  • Delays in message passing between servers in the cluster.
  • Ordering of messages needs to be maintained in spite of message delays.
  • Need to provide a consistent and easy API to the end user and hide the complexities

In case the distributed application has master-worker architecture, it needs to do the following:

  • Master needs to allocate tasks to workers.
  • Master needs to know if a worker goes down.
  • Master needs to maintain consistency in case a worker executes an incomplete transaction.
  • The system needs to assign a new master if the master crashes.
  • It needs to deal with split brain problem.

As you can see a distributed application needs so much coordination between the participating servers. This is where Zookeeper comes in picture. As explained in the last post, it is a coordinating service.

In the next post, we will look into the high level design of Zookeeper.

Tagged:

Leave a comment