Distributed Systems in Practice, in Theory Aysylu Greenberg March - - PowerPoint PPT Presentation

distributed systems in practice in theory
SMART_READER_LITE
LIVE PREVIEW

Distributed Systems in Practice, in Theory Aysylu Greenberg March - - PowerPoint PPT Presentation

Distributed Systems in Practice, in Theory Aysylu Greenberg March 8th, 2016 Confidential + Proprietary Confidential + Proprietary Confidential + Proprietary Confidential + Proprietary Aysylu Greenberg @aysylu22 Confidential + Proprietary


slide-1
SLIDE 1

Confidential + Proprietary Confidential + Proprietary

Distributed Systems in Practice, in Theory

Aysylu Greenberg March 8th, 2016

slide-2
SLIDE 2

Confidential + Proprietary

slide-3
SLIDE 3

Confidential + Proprietary

slide-4
SLIDE 4

Confidential + Proprietary

Aysylu Greenberg

@aysylu22

slide-5
SLIDE 5

Confidential + Proprietary

Towards Distributed Build System

slide-6
SLIDE 6

Confidential + Proprietary

Towards Distributed Build System

slide-7
SLIDE 7

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-8
SLIDE 8

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-9
SLIDE 9

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-10
SLIDE 10

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-11
SLIDE 11

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-12
SLIDE 12

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-13
SLIDE 13

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-14
SLIDE 14

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-15
SLIDE 15

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-16
SLIDE 16

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-17
SLIDE 17

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-18
SLIDE 18

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-19
SLIDE 19

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-20
SLIDE 20

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-21
SLIDE 21

Confidential + Proprietary

http://opencv.org/

Towards Distributed Build System

slide-22
SLIDE 22

Confidential + Proprietary

slide-23
SLIDE 23

Confidential + Proprietary

Papers We Love SF

slide-24
SLIDE 24

Confidential + Proprietary

Aysylu Greenberg

@aysylu22

slide-25
SLIDE 25

Confidential + Proprietary

meetup.com/Papers-We-Love-London

slide-26
SLIDE 26

Confidential + Proprietary

Today

  • Staged Event-Driven Architecture
slide-27
SLIDE 27

Confidential + Proprietary

Today

  • Staged Event-Driven Architecture
  • Leases
slide-28
SLIDE 28

Confidential + Proprietary

Today

  • Staged Event-Driven Architecture
  • Leases
  • Inaccurate Computations
slide-29
SLIDE 29

Confidential + Proprietary Confidential + Proprietary

Computer Science Research In Distributed Systems Industry

slide-30
SLIDE 30

Confidential + Proprietary

Operating systems research

slide-31
SLIDE 31

Confidential + Proprietary

Operating systems research

slide-32
SLIDE 32

Confidential + Proprietary

Operating systems research Concurrency

slide-33
SLIDE 33

Confidential + Proprietary

Operating systems research Concurrency Concurrency primitives: mutex & semaphore

slide-34
SLIDE 34

Confidential + Proprietary

Operating systems research Concurrency Concurrency primitives: mutex & semaphore Processes execute at different speeds

slide-35
SLIDE 35

Confidential + Proprietary

Time in distributed systems

slide-36
SLIDE 36

Confidential + Proprietary

Time in distributed systems

slide-37
SLIDE 37

Confidential + Proprietary

Time in distributed systems Pipelining

slide-38
SLIDE 38

Confidential + Proprietary

Time in distributed systems Pipelining

slide-39
SLIDE 39

Confidential + Proprietary

Internet

slide-40
SLIDE 40

Confidential + Proprietary

Internet Distributed consensus

slide-41
SLIDE 41

Confidential + Proprietary

Internet Distributed consensus

slide-42
SLIDE 42

Confidential + Proprietary

Internet Distributed consensus

slide-43
SLIDE 43

Confidential + Proprietary

Internet Distributed consensus Paxos

slide-44
SLIDE 44

Confidential + Proprietary

Reconsider large systems

slide-45
SLIDE 45

Confidential + Proprietary

Reconsider large systems Platform as a service

slide-46
SLIDE 46

Confidential + Proprietary

CS Research is Timeless

Inform decisions Mitigate technical risk

slide-47
SLIDE 47

Confidential + Proprietary Confidential + Proprietary

Staged Event Driven Architecture & Deep Pipelines

2001

slide-48
SLIDE 48

Confidential + Proprietary

Hardware Pipelines

slide-49
SLIDE 49

Confidential + Proprietary

Data Pipelines

https://en.wikipedia.org/wiki/Graphics_pipeline

slide-50
SLIDE 50

Confidential + Proprietary

Search Indexing Pipelines

slide-51
SLIDE 51

Confidential + Proprietary

Search Indexing Pipelines

slide-52
SLIDE 52

Confidential + Proprietary

Search Indexing Pipelines

slide-53
SLIDE 53

Confidential + Proprietary

Search Indexing Pipelines

slide-54
SLIDE 54

Confidential + Proprietary

Search Indexing Pipelines

slide-55
SLIDE 55

Confidential + Proprietary

Search Indexing Pipelines

slide-56
SLIDE 56

Confidential + Proprietary

Search Indexing Pipelines

slide-57
SLIDE 57

Confidential + Proprietary

Search Indexing Pipelines

slide-58
SLIDE 58

Confidential + Proprietary

Search Indexing Pipelines

slide-59
SLIDE 59

Confidential + Proprietary

Search Indexing Pipelines

slide-60
SLIDE 60

Confidential + Proprietary

Search Indexing Pipelines

slide-61
SLIDE 61

Confidential + Proprietary

slide-62
SLIDE 62

Confidential + Proprietary

Staged Event Driven Architecture

slide-63
SLIDE 63

Confidential + Proprietary

Single-machine pipeline generalizes to distributed pipelines Staged Event Driven Architecture

slide-64
SLIDE 64

Confidential + Proprietary

Staged Event Driven Architecture

  • Dynamic resource controllers
slide-65
SLIDE 65

Confidential + Proprietary

Staged Event Driven Architecture

  • Dynamic resource controllers

+

slide-66
SLIDE 66

Confidential + Proprietary

Staged Event Driven Architecture

  • Dynamic resource controllers

○ automatic tuning

+

slide-67
SLIDE 67

Confidential + Proprietary

Staged Event Driven Architecture

  • Dynamic resource controllers

○ automatic tuning ■ thread pool sizing

+

slide-68
SLIDE 68

Confidential + Proprietary

Staged Event Driven Architecture

  • Dynamic resource controllers

○ automatic tuning ■ thread pool sizing ■ event batching

+

slide-69
SLIDE 69

Confidential + Proprietary

+

  • Staged Event Driven Architecture
  • Dynamic resource controllers

○ automatic tuning ■ thread pool sizing ■ event batching ○ load shedding via queue

slide-70
SLIDE 70

Confidential + Proprietary

+

  • Staged Event Driven Architecture
  • Dynamic resource controllers

○ automatic tuning ■ thread pool sizing ■ event batching ○ load shedding via queue ■ backpressure

slide-71
SLIDE 71

Confidential + Proprietary

+

  • Staged Event Driven Architecture
  • Dynamic resource controllers

○ automatic tuning ■ thread pool sizing ■ event batching ○ load shedding via queue ■ backpressure ■ threshold, filter, reorder, aggregate

slide-72
SLIDE 72

Confidential + Proprietary Confidential + Proprietary

Leases as Heart Beat in Distributed Systems

1989

slide-73
SLIDE 73

Confidential + Proprietary

slide-74
SLIDE 74

Confidential + Proprietary

Leases

  • Distributed locking
slide-75
SLIDE 75

Confidential + Proprietary

Leases

  • Distributed locking
  • Lease term tradeoffs

○ short

slide-76
SLIDE 76

Confidential + Proprietary

Leases

  • Distributed locking
  • Lease term tradeoffs

○ short ■ delay from client and server failures minimized ■ reduced false write-sharing

slide-77
SLIDE 77

Confidential + Proprietary

Leases

  • Distributed locking
  • Lease term tradeoffs

○ short vs long

slide-78
SLIDE 78

Confidential + Proprietary

Leases

  • Distributed locking
  • Lease term tradeoffs

○ short vs long ■ more efficient for frequently accessed data ■ minimized lease extension overhead on server and client

slide-79
SLIDE 79

Confidential + Proprietary

Leases

  • Distributed locking
  • Lease term tradeoffs

○ short vs long

  • Use of leases in modern applications

○ Leader election TTL (in etcd)

slide-80
SLIDE 80

Confidential + Proprietary

Leases

  • Distributed locking
  • Lease term tradeoffs

○ short vs long

  • Use of leases in modern applications

○ Leader election TTL (in etcd) ○ Liveness detection

slide-81
SLIDE 81

Confidential + Proprietary

slide-82
SLIDE 82

Confidential + Proprietary

Do the build, s'il vous plaît!

Build System

Dita Roque-Gourary

slide-83
SLIDE 83

Confidential + Proprietary

Do the build, s'il vous plaît!

Build System

OK/D'Accord! Dita Roque-Gourary

slide-84
SLIDE 84

Confidential + Proprietary

Do the build, s'il vous plaît!

Build System

OK/D'Accord! Waiting for the results, merci. Dita Roque-Gourary

slide-85
SLIDE 85

Confidential + Proprietary

Do the build, s'il vous plaît!

Build System

OK/D'Accord! Waiting for the results, merci. Build is in progress Dita Roque-Gourary

slide-86
SLIDE 86

Confidential + Proprietary

Do the build, s'il vous plaît!

Build System

OK/D'Accord! Waiting for the results, merci. Build is in progress Dita Roque-Gourary Waiting for the results, merci.

slide-87
SLIDE 87

Confidential + Proprietary

Do the build, s'il vous plaît!

Build System

OK/D'Accord! Waiting for the results, merci. Build is in progress Build is finished/fini. Dita Roque-Gourary Waiting for the results, merci.

slide-88
SLIDE 88

Confidential + Proprietary

Leases in Build System

slide-89
SLIDE 89

Confidential + Proprietary Confidential + Proprietary

Inaccurate Computations & Serving Search Results

slide-90
SLIDE 90

Confidential + Proprietary

From Accurate to "Good Enough"

slide-91
SLIDE 91

Confidential + Proprietary

slide-92
SLIDE 92

Confidential + Proprietary

slide-93
SLIDE 93

Confidential + Proprietary

slide-94
SLIDE 94

Confidential + Proprietary

slide-95
SLIDE 95

Confidential + Proprietary

slide-96
SLIDE 96

Confidential + Proprietary

Inaccuracy for Resilience

  • 1. Task decomposition
slide-97
SLIDE 97

Confidential + Proprietary

Inaccuracy for Resilience

  • 1. Task decomposition
  • 2. Baseline for correctness
slide-98
SLIDE 98

Confidential + Proprietary

Inaccuracy for Resilience

  • 1. Task decomposition
  • 2. Baseline for correctness
  • 3. Criticality Testing
slide-99
SLIDE 99

Confidential + Proprietary

Inaccuracy for Resilience

  • 1. Task decomposition
  • 2. Baseline for correctness
  • 3. Criticality Testing
  • 4. Distortion and timing models
slide-100
SLIDE 100

Confidential + Proprietary

Jeff Dean "Building Software Systems at Google and Lessons Learned", Stanford, 2010

slide-101
SLIDE 101

Confidential + Proprietary

Jeff Dean "Building Software Systems at Google and Lessons Learned", Stanford, 2010

slide-102
SLIDE 102

Confidential + Proprietary

slide-103
SLIDE 103

Confidential + Proprietary

slide-104
SLIDE 104

Confidential + Proprietary

Robust & scaleable pipelines

slide-105
SLIDE 105

Confidential + Proprietary

Robust & scaleable pipelines Leases for sharing & heartbeat

slide-106
SLIDE 106

Confidential + Proprietary

Robust & scaleable pipelines Leases for sharing & heartbeat Trade off inaccuracy for resilience & performance

slide-107
SLIDE 107

Confidential + Proprietary

Robust, scaleable pipelines Leases for sharing & heartbeat Trade off inaccurate for resilient

CS research is timeless: use it to mitigate risk

slide-108
SLIDE 108

Confidential + Proprietary

Thanks

Ines Sombra David Greenberg Alex Hutcheson Scott Zawalski Karan Parikh

slide-109
SLIDE 109

Confidential + Proprietary

References

  • T. Wurthinger, C. Wimmer et al. "One VM to Rule Them All"
  • M. Rinard "Probabilistic Accuracy Bounds for Fault-Tolerant

Computations that Discard Tasks"

  • F. Corbato, M. Daggett, R. Daley "An Experimental Time-

Sharing System"

  • E. Dijkstra "Cooperating Sequential Processes"
  • L. Lamport "Time, Clocks, and the Ordering of Events in a

Distributed System"

slide-110
SLIDE 110

Confidential + Proprietary

References

  • B. Oki, B. Liskov "Viewstamped Replication: A New Primary Copy

Method to Support Highly-Available Distributed Systems"

  • L. Lamport "The Part-Time Parliament"
  • M. Welsh, D. Culler, E. Brewer "SEDA: An Architecture for Well-

Conditioned, Scalable Internet Services"

  • C. Gray, D. Cheriton "Leases: An Efficient Fault-Tolerant

Mechanism for Distributed File Cache Consistency"

  • S. Agarwal, B. Mozafari et al. "BlinkDB: Queries with Bounded

Errors and Bounded Response Times on Very Large Data"

slide-111
SLIDE 111

Confidential + Proprietary

Should I read papers? YES