Verónica López
April 29, 2017
4.9k

# The Math Behind Distributed Systems

Algebraic Topology (and Graph Theory) used to explain the interconnections and verification of a distributed system

April 29, 2017

## Transcript

CONNECT 2017
2. ### whoami •Software Engineer •Former physicist; sci comp •Academia + Industry

•Trying to make computers and science converge <- modern approach

at math?
5. ### Math is very useful for programming and systems design, but

that might not mean what you think it means.
6. ### Math in CS •Basic: e.g.arithmetic, geometry (frontend), logic •Speciﬁc: e.g.

linear algebra (machine learning, big data), calculus (simulations) •General: e.g. graph theory, topology
7. ### Math in CS •Basic: e.g.arithmetic, geometry (frontend), logic •Speciﬁc: e.g.

linear algebra (machine learning, big data), calculus (simulations) •General: e.g. graph theory, topology

11. ### “A distributed system is one in which the failure of

a computer you didn’t even know existed can render your own computer unusable” Leslie Lamport
12. ### Ideal Distributed Systems •Fault-Tolerant •Highly available •Recoverable •Consistent •Scalable •Predictable

Performance •Secure •Etc…
13. ### Design for Failure We can’t have it all (at the

same time), so…

15. ### Probability •If the probability of something happening is one in

10^13, how often would it happen? •“Real life”: Never •Physics: All the time. •Think about servers (infrastructure) at scale.

18. ### Graph Theory •The study of graphs: the mathematical structures used

to model pairwise relations between objects. •Two concepts: nodes (vertices) & lines (edges) •Might be directed or indirected
19. ### The paper on the Seven Bridges of Königsberg (1736, Leonard

Euler) is considered the ﬁrst paper in history of graph theory.
20. ### Graph Theory in Distsys •Design system’s connectivity •k-connectedness: how many

nodes we need for a graph to disconnect a graph •Verify points of failure •Rearrange stuff
21. None
22. None

24. ### Topology •The study of geometric properties and spatial relations unaffected

by the continuous change of shape or size of ﬁgures (formal) •Interrelation (informal)
25. ### Topological Properties •Properties that remain invariant under continuous stretching and

bending of the object •E.g. Path connectivity, higher dimensional analogs
26. ### The paper on the Seven Bridges of Königsberg (1736, Leonard

Euler) is considered the ﬁrst paper in history of topology (too!).

29. ### Combinatorial (Algebraic) Topology •Studies spaces that can be constructed with

discretized pieces •Allows to have all the (system) perspectives (of a node) available at the same time. •Perspectives evolve with communication

31. ### Veriﬁcation of a Distributed System •Talk & Article by Caitie

McCaffrey (@caitie) •Article: List of methods that prove properties about a system. •Systems get a gold star. •Very hard to get! (Expensive and/or slow)
32. ### Veriﬁcation of a Distributed System •Formal Speciﬁcation Languages (deﬁnition &

correctness) <- AWS •Model Checking (execute all paths) •Composition (more than 1) •Instead: canaries, monitoring, SREs, etc.
33. None
34. ### Combinatorial Topology could be used to (help) formally verify a

distributed system (through algebraic expressions)

36. ### Extra resources • Algebraic Topology and Distributed Computing, A Primer

http://cs.brown.edu/~mph/HerlihyR96/sv.pdf • The Topology of Distributed Adversaries https:// link.springer.com/article/10.1007/s00446-013-0189-9 • The Topological Structure of Asynchronous Computability http://cs.brown.edu/~mph/HerlihyS99/p858-herlihy.pdf • The Veriﬁcation of a Distributed System http:// queue.acm.org/detail.cfm?id=2889274