Part 1: An Introduction to Distributed Systems
Part 1: An Introduction to Distributed Systems

By Jon Bosanac (LinkedIn)

Introduction

We are living in a period of human history characterized by the rapid shift from industrial production to information-based and computerized production. It’s the golden age of data, an age of information superabundance, and building efficient systems which can utilize the available yet largely unutilized data resources is an imperative. Sophisticated distributed systems that can render large-scale data processing can help our applications utilize data in real time on a massive scale.

What is a distributed system?

A distributed system is defined as autonomous components, or software systems, that are located on a network and can communicate to each other by messaging. The challenge with distributed systems is to make the system reliable and performant as it scales. As the reach of our applications grow along with the subsequent demands on these applications, the role and science of distributed systems is becoming increasingly important.

What’s Driving Interest in Distributed Systems?

The growth is being fueled  by improved bandwidth, increasingly cheap and reliable storage and compute power, and of course the global growth in utilization of all applications, especially on mobile devices. New technologies are also fueling growth. Enterprises are discovering the power of distributed programming tools such as EJB, Corba, Docker, Hashicorp, Mesos, OpenHPC etc. and the new databases, such as NoSQL, that are built to operate in a distributed fashion. Many of these tools are now available to trial and experiment with in cloud and hybrid-cloud environments making them more accessible. In short, we are in a perfect storm for distributed systems know-how. The networks and the technologies and the competitive landscape are converging to made what was, just a few short years ago, impossible now possible.  

Solutions Provided by Well Running Distributed Systems

E-commerce companies face distributed systems challenges daily. If they are trying to ensure their application is performant, then they’ll operate it in a distributed fashion. In doing so they will have to distribute their inventory and customer databases – effectively replicating them in many locations. Replicating databases not only provides the benefit of redundancy, but also accessibility can be improved by having the database in N+1 locations. If these databases are distributed, how do they ensure they are consistent and available to the application at all times? If a customer buys a large quantity of an available item and then inventory is deprecated, how do we ensure that it’s simultaneously deprecated in all instances of the inventory databases so that customers aren’t purchasing inventory that’s not available?

Some of the enterprise-level benefits of distributed systems.

  • Enhanced Performance 
    Distributed systems make way for better service performance than centralized systems. Such systems distribute the computational load across multiple nodes and each of these locations is put under less stress. This enables the nodes to perform more effectively, and this in turn improves the performance of the entire service. It’s not only distribution of the workload but also being able to move the intelligence of the application electronically closer to the end user. Response time will generally be better if the database underlying an application is on the same continent, for example, as the user.

  • Greater Reliability 
    If computation is done around a single machine, the machine’s health indicates the health of the service. So if a machine goes down, the service also gets affected. Distributed systems, on the contrary, continue to function even if a single node stops to function. Some systems may even continue to operate reliably in the case of a network failure or network partition.
  • Better Scalability 
    Distributed systems function across multiple machines, owing to which these systems are inherently scalable. This implies that a distributed system can make optimal use of system resources in the light of the demand it is under. If a system is under heavy pressure, every machine can be run to its capacity.

Distribution is not just duplication. Distribution is a system which helps deliver the ‘right content’ just at the ‘right time’ and at the ‘right place’.

Challenges of Presented by Distributed Systems

To the untrained eye, running and maintaining distributed systems may not appear to be overly complex, but believe us when we say that there are not too many computer science tasks that are as challenging as solving large scale distributed systems deployments. Distributed systems are a science into themselves. If you truly want to understand the challenges then you’ll have to understand concepts such as causality, the science of clocks (see Vector Clocks) and conflict-free replicated data types.

Fundamental to the challenges of scalable distributed systems is that there is no guarantee of consistency and availability at all times. No distributed system is safe from network failures, as the CAP theorem from the computer scientist Eric Brewer explains. The CAP theorem states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees: Consistency, Availability and Partition Tolerance. Effectively, your replicated data store can either be consistent and have high partition tolerance, but availability will suffer, or it can be consistent and available but partition tolerance will suffer. For those looking to build scalable applications, we suggest you carefully prioritize your business priorities prior to selecting a database to underlie it.  There are many databases to evaluate, see a categorized list https://db-engines.com/en/

The internet and network technologies have become far more sophisticated over the years, and executing codes at the network edge has become a lot easier within Distributed Compute Environment. It’s the age of decentralizing data and computational abilities across multiple nodes that function in unison. The benefits outnumber the downsides, and the faster time-to-market and lower operational costs are the reasons why the business users are clamoring for developers with deep distributed systems knowledge.

Part 2 will be coming soon and that will focus on one of the application families driving the importance of Distributed Systems – Time Series applications. We welcome your feedback on this article.

Sources: