Posts

Showing posts with the label time

Do tightly synchronized clocks help consensus?

Image
Let's start with the impossibility results, a good place to start distributed systems discussion. The coordinated attack result says that if the communication channels can drop messages arbitrarily and undetectably you cannot solve distributed consensus using a deterministic protocol in finite rounds. This result is all about *the curse of asymmetry of information*. Reliable channels are needed for two parties to agree on something. Otherwise the two parties are stuck in a Zeno's paradox of "You may not know that I know that you know that I know" kind of information chaining. A classic paper to checkout on the topic is " Knowledge and common knowledge in a distributed environment ". Assuming mostly reliable channels and demanding majority acks, it is possible to solve consensus in a partially synchronous system. Paxos shows us how to do this. Paxos uses quorum of acks to get around the problem of "the agreement having to occur in one shot" as in ...

Sundial: Fault-tolerant Clock Synchronization for Datacenters

Image
This paper appeared recently in OSDI 2020 . This paper is about clock synchronization in the data center. I presented this paper for our distributed systems zoom meeting group . I took a wider view of the problem by explaining time synchronization challenges and fundamental techniques to achieve precise time synchronization. I will take the same path in this post as well. It is a bit circuitous road, but it gives a scenic pleasurable journey. So let's get going. The benefits of better time synchronization For any distributed system, timestamping and ordering of events is a very important thing. Processes in a distributed system run concurrently without knowing what the other processes are doing at the moment.  Processes learn about each other's states only by sending and receiving messages and this information by definition come from the past state of the nodes. The process needs to compose the coherent view of the system from these messages and all the while the system is movi...

Hybrid clocks crate in Rust

Image
I have been learning Rust in my spare time. It has a very steep learning curve, but in return you get to use an elegant, fast, and safe programming language you can use anywhere from embedded systems to datacenter computing. Rust stole like an artist the best concepts from several languages and combined them under one roof with style. Rust has seen a lot of traction recently, and I think Rust is here to stay for a long time.  In the last couple months, I have been writing small programs to practice Rust, and recently I decided I should go bigger and consider reading a real code base, but something with manageable size. I chose to focus on the hybrid clocks crate because it was the right size, and it solved an important problem.  The hybrid clocks crate showcases many of the best practices of Rust. It has a thoughtful design. It shows practical use of struct and trait implementations and trait objects . It was initially hard for me to wrap my mind around the design, because t...

Enabling lightweight transactions with precision time (ASPLOS 2017)

Image
This paper is by Pulkit A. Misra, Jeffrey S. Chase, Johannes Gehrke, Alvin R. Lebeck, and it appeared at ASPLOS'17. The paper describes *Semel*, a durable multi-version read-optimized key-value store, and *Milana*, a distributed OCC transaction system built on top of Semel. The main ideas in the paper are to exploit precision time (PTP) and efficient persistent memory based on flash NVM/SSD, and to show how they helped for building OCC based distributed transactional system. In a way, this paper revisited and revised Thor and showed the benefits achievable from using modern clocks and storage technologies inside a datacenter. Thor (Sigmod 1995), was from Barbara Liskov's group, and introduced loosely synchronized clocks for OCC, and performed validation on the storage servers. Before we summarize Semel and Milana, let's recap the main contributions of this paper: Move ordering off the critical path: Each version of a key's value is timestamped using PTP. These timestam...