$30 off During Our Annual Pro Sale. View Details »

The Math Behind Distributed Systems

The Math Behind Distributed Systems

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

Verónica López

April 29, 2017
Tweet

More Decks by Verónica López

Other Decks in Research

Transcript

  1. The (beauty of) math behind distributed systems Verónica López @maria_fibonacci

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

    •Trying to make computers and science converge <- modern approach
  3. Agenda • Distributed Systems • Graph Theory • Topology

  4. People ask benefits of math What if I’m not good

    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 •Specific: 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 •Specific: e.g.

    linear algebra (machine learning, big data), calculus (simulations) •General: e.g. graph theory, topology
  8. All these concepts have connectivity in common

  9. Agenda •Distributed Systems •Graph Theory •Topology

  10. Famous -and overused- quote about distsys…

  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…
  14. Design for Failure Probability Connectivity

  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.
  16. Connectivity

  17. Agenda •Distributed Systems •Graph Theory •Topology

  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 first 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
  23. Agenda •Distributed Systems •Graph Theory •Topology

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

    by the continuous change of shape or size of figures (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 first paper in history of topology (too!).
  27. Topologically identical objects

  28. Pyramids —> Division (triangulation) —> Sphere

  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
  30. Agenda •Distributed Systems •Graph Theory •Topology

  31. Verification 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. Verification of a Distributed System •Formal Specification Languages (definition &

    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)
  35. There’s a book! (Distributed Computing Through Combinatorial Topology)

  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 Verification of a Distributed System http:// queue.acm.org/detail.cfm?id=2889274