Sitemap
Taka Ishikawa

Taka Ishikawa

Software Engineer

Learning Distributed Computing

— Problems and Properties

3 min readFeb 23, 2018

--

What and Why

If we want to serve a product or service that requires many complex tasks at scale, single computer is not enough no matter how it’s powerful. So let’s make the computers work as a team! Distributed computing enables a solution that scales. But there’s a trade-off using distributed computing. Like us, computers can miscommunicate and draw a unpredictable outcome. This is called Consistency problem. How we can achieve the predictable scaling distributed system?

Consistency

— Attribute that Guarantee Everybody Get the Same Result.

Consistency is a promise made between a programmer and a system. If programmer follow the role, the system guarantee the results of operations such as reading, writing, updating, deleting are predictable. Technically, if the system is fully consistent, all nodes see the same data at the same time. In reality, complete consistency is hard to achieve because of the stochastic nature of the world.

Consensus

— Rules to Decide a Single Piece of Truth among Nodes of a Distributed System.

Consensus problem requires agreement among a number of processes for a single data value. There’s many reasons disagreements can happen such as dishonesty or unintentional error in one or more processes. A consensus protocol tolerating halting failures must satisfy the following properties.

  • Termination: every correct process decides some value.
  • Validity: if all processes propose the same value v, then all correct processes decide v.
  • Integrity: every correct process decides at most one value, and if it decides some value v, then v must have been proposed by some process.
  • Agreement: every correct process must agree on the same value.

Atomicity

— A Property of Writing of a Data: All or Nothing

Get Taka Ishikawa’s stories in your inbox

Join Medium for free to get updates from this writer.

When modifying an shared object, if the multiple operations applied, atomicity guarantees the operations complete perfectly as expected if condition met or do change nothing if something wrong. It guarantees all or nothing. It guarantees complete success or complete failure.

Linearizability

— A Consistency Model for High Consistency

Linearizability introduces more restrictive definitions of atomicity. Linearizability provides a real-time guarantee on the behavior of a set of single operations on a single object. Modification of a object appears to take place instantaneously and all later accesses are supposed to return the modified value or a value modified even later. This models has a strong guarantee on consistency however may draw a low availability to keep the premise.

Eventual Consistency

— A Consistency Model for Modest Consistency for High Availability

On the other hand, eventual consistency model guarantees high availability with low consistency. It does guarantee the reads return the same value at some point but not always so. Often it’s called BASE (Basically Available, Soft state, Eventual consistency). How it works is that it embeds a process of exchanging versions or updates of data between servers and choosing an final state if there’s any conflicts. A basic approaches are ‘last writer wins’, user-specified conflict handler, or Timestamps/vector clocks.

Fault Tolerance

— A Property of a System that Perform Still in the Failure of the Components

Fault tolerance system does not degrade or does so in smaller margin its performance in the event of failure in any component that belongs to the system. Adding fault tolerance to the system should be highly considered when it has critical, likely-to-fail component and the cost of installment is fairly low.

Now we learned about the major problems and properties in distributed computing system. In the next series, let’s cover some of the major protocols that is known to be fault-tolerance to achieve consistency.

--

--