Brendan Ang

Search

Search IconIcon to open search

Distributed Abstractions

Last updated Jan 31, 2023 Edit Source

# Distributed Abstractions

The basic building blocks of any distributed system is a set of distributed algorithms. which are implemented as a middleware between network (OS) and the application.

# Event based Component Model

The distributed computing model consists of a set of processes and a network. Events can be used as messages between components of the same process, which trigger event handlers. Types of events

# Specifications

A distributed system specification includes the interface, correctness properties and model/assumptions.

# Interface

This specifies the API, importantly, the requests and events of the service

# Correctness Properties

Any trace property can be expressed as a conjunction of Safety and Liveliness properties.

# Model/Assumptions

# Failure assumptions

Processes that do not fail in an execution are correct.

# Crash stop failure

Process is not correct if it stops taking steps like sending and receiving messages.

# Omission failure

Process is not correct if it omits sending or receiving messages

# Crash recovery

Process is not correct if it crashes and

May recover after crashing with a special recovery event automatically generated

# Byzantine

Process behaves arbitrarily such as sending messages not in its algorithm, or behave maliciously attacking the system. 500 Model B is a special case of model A if a process that works correctly under A, also works correctly under B.

# Quorums

A quorum is any set of majority processes (i.e. $\lfloor N/2\rfloor+1$)

# Channel Failure Modes

Channels delivers any message sent with non-zero probability (no network partitions) 500

500

Channels delivers any message sent infinitely many times 500

500 We can implement stubborn links using fair loss links

Channels that deliver any message sent exactly once. 500 500 500

# Timing assumptions

Processes: bounds on time to make a computation step
Network: Bounds on time to transmit a message between a sender and a receiver
Clocks: Lower and upper bounds on clock rate-drift and clock skew w.r.t. real time

Asynchronous systems: no timing assumption on process and channels Partially synchronous systems: eventually every execution will exhibit synchrony Synchronous systems: build on solid timed operations and clocks

# Causality

In the asynchronous model, we can only reason about the order of events by observing which events may cause other events.

# Computation Theorem and equivalence

A permutation of the same collection events whilst preserving causal order are said to be equivalent.

# Logical Clocks

A logical clock is an algorithm that assigns a timestamp to each event occurring in a
distributed system. $$if \\ a\rightarrow b, t(a)<t(b)$$

# Lamport clocks:

500 500

# Vector clocks

We want to tell the causal relation using the timestamps. $$ \begin{align} v(a) < v(b), then\\ a\rightarrow_\beta b \\ if\\ a\rightarrow_\beta b,v(a)<v(b) \end{align} $$ Limitations

# Similarity

If two executions F and E have the same collection of events, and their causal order is preserved, F and E are said to be similar executions, written F~E

# Failure Detectors