Context Since we are at the end Announcements This is the last - - PowerPoint PPT Presentation

context
SMART_READER_LITE
LIVE PREVIEW

Context Since we are at the end Announcements This is the last - - PowerPoint PPT Presentation

Context Since we are at the end Announcements This is the last class of the semester -- no more class meetings. Announcements This is the last class of the semester -- no more class meetings. Please respond to the Doodle poll to set


slide-1
SLIDE 1

Context

Since we are at the end

slide-2
SLIDE 2

Announcements

  • This is the last class of the semester -- no more class meetings.
slide-3
SLIDE 3

Announcements

  • This is the last class of the semester -- no more class meetings.
  • Please respond to the Doodle poll to set up a 15 minute slot to meet.
slide-4
SLIDE 4

Announcements

  • This is the last class of the semester -- no more class meetings.
  • Please respond to the Doodle poll to set up a 15 minute slot to meet.
  • First slot early tomorrow, last slot is at 8:45pm next Wednesday.
slide-5
SLIDE 5

Announcements

  • This is the last class of the semester -- no more class meetings.
  • Please respond to the Doodle poll to set up a 15 minute slot to meet.
  • First slot early tomorrow, last slot is at 8:45pm next Wednesday.
  • Must prepare a few slides. Also come prepared to demo if you are done.
slide-6
SLIDE 6

Announcements

  • This is the last class of the semester -- no more class meetings.
  • Please respond to the Doodle poll to set up a 15 minute slot to meet.
  • First slot early tomorrow, last slot is at 8:45pm next Wednesday.
  • Must prepare a few slides. Also come prepared to demo if you are done.
  • Meeting is required to get a grade for the final project.
slide-7
SLIDE 7

Announcements

  • Final project report is due next Wednesday at 23:59. No extensions.
slide-8
SLIDE 8

Announcements

  • Final project report is due next Wednesday at 23:59. No extensions.
  • The final project is 40% of the grade, so don't miss this deadline.
slide-9
SLIDE 9

Announcements

  • Final project report is due next Wednesday at 23:59. No extensions.
  • The final project is 40% of the grade, so don't miss this deadline.
  • Lab 2 grades will be out by Monday (probably sooner).
slide-10
SLIDE 10

From Lecture 1

slide-11
SLIDE 11

Three Main Reasons

slide-12
SLIDE 12

Three Main Reasons

  • Fault tolerance
slide-13
SLIDE 13

Three Main Reasons

  • Fault tolerance
  • Survive some forms of failures or bug.
slide-14
SLIDE 14

Three Main Reasons

  • Fault tolerance
  • Survive some forms of failures or bug.
  • Scalability
slide-15
SLIDE 15

Three Main Reasons

  • Fault tolerance
  • Survive some forms of failures or bug.
  • Scalability
  • Use more resources than a single computer can provide.
slide-16
SLIDE 16

Three Main Reasons

  • Fault tolerance
  • Survive some forms of failures or bug.
  • Scalability
  • Use more resources than a single computer can provide.
  • Geographic Reach
slide-17
SLIDE 17

Three Main Reasons

  • Fault tolerance
  • Survive some forms of failures or bug.
  • Scalability
  • Use more resources than a single computer can provide.
  • Geographic Reach
  • Work even when information is spread across large distances.
slide-18
SLIDE 18

But Where?

slide-19
SLIDE 19

Look at Three Places

Datacenters

slide-20
SLIDE 20

Look at Three Places

Datacenters Sensors/Internet of Things

slide-21
SLIDE 21

Look at Three Places

Datacenters Sensors/Internet of Things The Internet

slide-22
SLIDE 22

Look at Three Places

Datacenters Sensors/Internet of Things The Internet

N

  • t

i n C h r

  • n
  • l
  • g

i c a l O r d e r

slide-23
SLIDE 23

Same Goals Different Requirements

  • Datacenter: Single administrative domain, lots of compute capacity.
slide-24
SLIDE 24

Same Goals Different Requirements

  • Datacenter: Single administrative domain, lots of compute capacity.
  • Control and knowledge of what is running where, etc.
slide-25
SLIDE 25

Same Goals Different Requirements

  • Datacenter: Single administrative domain, lots of compute capacity.
  • Control and knowledge of what is running where, etc.
  • IoT: Single administrative domain, limited resources.
slide-26
SLIDE 26

Same Goals Different Requirements

  • Datacenter: Single administrative domain, lots of compute capacity.
  • Control and knowledge of what is running where, etc.
  • IoT: Single administrative domain, limited resources.
  • Higher failure rates (potentially). Need to limit resources.
slide-27
SLIDE 27

Same Goals Different Requirements

  • Datacenter: Single administrative domain, lots of compute capacity.
  • Control and knowledge of what is running where, etc.
  • IoT: Single administrative domain, limited resources.
  • Higher failure rates (potentially). Need to limit resources.
  • Internet: Different administrative domains.
slide-28
SLIDE 28

Same Goals Different Requirements

  • Datacenter: Single administrative domain, lots of compute capacity.
  • Control and knowledge of what is running where, etc.
  • IoT: Single administrative domain, limited resources.
  • Higher failure rates (potentially). Need to limit resources.
  • Internet: Different administrative domains.
  • Figure out incentives for systems to work together, align with economics, etc.
slide-29
SLIDE 29

Datacenters

slide-30
SLIDE 30

What Datacenters

  • The Internet and the web meant lots of clients might be connecting to one service
slide-31
SLIDE 31

What Datacenters

  • The Internet and the web meant lots of clients might be connecting to one service
  • Question: How to scale compute to serve all of these clients?
slide-32
SLIDE 32

What Datacenters

  • The Internet and the web meant lots of clients might be connecting to one service
  • Question: How to scale compute to serve all of these clients?
  • In the early-1990s a few answers: mainframes, custom computers, etc.
slide-33
SLIDE 33

What Datacenters

  • The Internet and the web meant lots of clients might be connecting to one service
  • Question: How to scale compute to serve all of these clients?
  • In the early-1990s a few answers: mainframes, custom computers, etc.
  • One research idea: a network of workstations that can compute together.
slide-34
SLIDE 34

What Datacenters

  • What workstation? Over time differences between smaller computers blurred.
slide-35
SLIDE 35

What Datacenters

  • What workstation? Over time differences between smaller computers blurred.
  • Now: just a building with a lot of servers in racks connected by a fast network.
slide-36
SLIDE 36

What Datacenters

  • What workstation? Over time differences between smaller computers blurred.
  • Now: just a building with a lot of servers in racks connected by a fast network.
  • How many servers? Do not know for sure, but 50,000 to 100,000 are common.
slide-37
SLIDE 37

Challenges

  • Where to build?
slide-38
SLIDE 38

Challenges

  • Where to build?
  • How to build?
slide-39
SLIDE 39

Challenges

  • Where to build?
  • How to build?
  • How to maintain?
slide-40
SLIDE 40

Challenges

  • Where to build?
  • How to build?
  • How to maintain?
  • How to manage infrastructure?
slide-41
SLIDE 41

Challenges

  • Where to build?
  • How to build?
  • How to maintain?
  • How to manage infrastructure?
  • How to effectively utilize capacity?
slide-42
SLIDE 42

Challenges

  • Where to build?
  • How to build?
  • How to maintain?
  • How to manage infrastructure?
  • How to effectively utilize capacity?
slide-43
SLIDE 43

Programming Models for Datacenter

slide-44
SLIDE 44

How to Scale Programs for Datacenters

  • The answer of course depends on application.
slide-45
SLIDE 45

How to Scale Programs for Datacenters

  • The answer of course depends on application.
  • Going to look at a few examples of how people have used datacenters
slide-46
SLIDE 46

How to Scale Programs for Datacenters

  • The answer of course depends on application.
  • Going to look at a few examples of how people have used datacenters
  • To serve web requests.
slide-47
SLIDE 47

How to Scale Programs for Datacenters

  • The answer of course depends on application.
  • Going to look at a few examples of how people have used datacenters
  • To serve web requests.
  • To gather and run computations on large amounts of data.
slide-48
SLIDE 48

How to Scale Programs for Datacenters

  • The answer of course depends on application.
  • Going to look at a few examples of how people have used datacenters
  • To serve web requests.
  • To gather and run computations on large amounts of data.
  • Combining the two.
slide-49
SLIDE 49

Serving Web Requests

slide-50
SLIDE 50

Defining the Problem

Clients Web Server Database

slide-51
SLIDE 51

Defining the Problem

Clients Web Server Database Request

slide-52
SLIDE 52

Defining the Problem

Clients Web Server Database Request

slide-53
SLIDE 53

Defining the Problem

Clients Web Server Database Request Query

slide-54
SLIDE 54

Defining the Problem

Clients Web Server Database Request Query Result

slide-55
SLIDE 55

Defining the Problem

Clients Web Server Database Query Result Response

slide-56
SLIDE 56

Defining the Problem

Clients Web Server Database Query Result Response

slide-57
SLIDE 57

Defining the Problem

How to handle an increase in the number of clients?

slide-58
SLIDE 58

Solving the Problem

Can replicate web servers and put them behind a load balancer

slide-59
SLIDE 59

Solving the Problem

Can replicate web servers and put them behind a load balancer Any problems with this strategy?

slide-60
SLIDE 60

Solving the Problem

Assuming most queries are reads can cache data. Why not just replicate databases?

slide-61
SLIDE 61

Solving the Problem

Assuming most queries are reads can cache data. Any problems with this strategy? Why not just replicate databases?

slide-62
SLIDE 62

Solving the Problem

Can shard data (need to be aware of transactions).

A-D E-H I J-O P-

Why not just replicate databases?

slide-63
SLIDE 63

Solving the Problem

Can shard data (need to be aware of transactions). Any problems with this strategy?

A-D E-H I J-O P-

Why not just replicate databases?

slide-64
SLIDE 64

Sharding is Hard

slide-65
SLIDE 65

Solving the Problem

What about fault tolerance?

A-D E-H I J-O P-

Why not just replicate databases?

slide-66
SLIDE 66

Gathering and Running Computation

slide-67
SLIDE 67

PageRank

  • Need to discover and rank pages on the web.
slide-68
SLIDE 68

PageRank

  • Need to discover and rank pages on the web.
  • Was done manually for a while.
slide-69
SLIDE 69

PageRank

  • Need to discover and rank pages on the web.
  • Was done manually for a while.
  • Metric: Pages which are linked to a lot are authoritative.
slide-70
SLIDE 70

PageRank

  • Need to discover and rank pages on the web.
  • Was done manually for a while.
  • Metric: Pages which are linked to a lot are authoritative.
slide-71
SLIDE 71

PageRank

  • Need to discover and rank pages on the web.
  • Was done manually for a while.
  • Metric: Pages which are linked to a lot are authoritative.
  • Task: Find number of links to each page.
slide-72
SLIDE 72

PageRank

  • Need to discover and rank pages on the web.
  • Was done manually for a while.
  • Metric: Pages which are linked to a lot are authoritative.
  • Task: Find number of links to each page.
  • Challenge: 30 trillion (and growing) pages today.
slide-73
SLIDE 73

Web Crawlers

a.com/i Output

slide-74
SLIDE 74

Web Crawlers

a.com/i /j Output a.com/i -> a.com/j a.com/j

slide-75
SLIDE 75

Web Crawlers

a.com/i /j /k Output a.com/i -> a.com/j a.com/i -> a.com/k a.com/j a.com/k

slide-76
SLIDE 76

Web Crawlers

a.com/i /j /k d.com/a Output a.com/i -> a.com/j a.com/i -> a.com/k a.com/i -> d.com/a a.com/j a.com/k d.com/a

slide-77
SLIDE 77

Web Crawlers

a.com/i /j /k d.com/a ... Output a.com/i -> a.com/j a.com/i -> a.com/k a.com/i -> d.com/a a.com/j a.com/k d.com/a

slide-78
SLIDE 78

Web Crawlers

a.com/i /j /k d.com/a ... Output a.com/i -> a.com/j a.com/i -> a.com/k a.com/i -> d.com/a a.com/j a.com/k d.com/a

slide-79
SLIDE 79

Web Crawlers

a.com/i /j /k d.com/a ... Output a.com/i -> a.com/j a.com/i -> a.com/k a.com/i -> d.com/a a.com/j a.com/k d.com/a

slide-80
SLIDE 80

Scaling Web Crawling

  • Why independent outputs?

Output 1 Output 2 Output 3 Output 4

slide-81
SLIDE 81

Scaling Web Crawling

  • Why independent outputs?
  • Is starting from independent pages sufficient?

Output 1 Output 2 Output 3 Output 4

slide-82
SLIDE 82

Scaling Web Crawling

  • Why independent outputs?
  • Is starting from independent pages sufficient?
  • For correctness?

Output 1 Output 2 Output 3 Output 4

slide-83
SLIDE 83

Scaling Web Crawling

  • Why independent outputs?
  • Is starting from independent pages sufficient?
  • For correctness?
  • For scalability?

Output 1 Output 2 Output 3 Output 4

slide-84
SLIDE 84

Scaling Web Crawling

  • Why independent outputs?
  • Is starting from independent pages sufficient?
  • For correctness?
  • For scalability?
  • How to address any issues?

Output 1 Output 2 Output 3 Output 4

slide-85
SLIDE 85

Computing PageRank

Output 1 Output 2 Output 3 Output 4

a->b c->b a->b d->c y->a x->j ... ... ... a->b c->b d->c y->a x->j

slide-86
SLIDE 86

Computing PageRank

Output 1 Output 2 Output 3 Output 4

a->b c->b a->b d->c y->a x->j ... ... ... a->b c->b d->c y->a x->j c->b y->a d->c x->j a->b

slide-87
SLIDE 87

Computing PageRank

Output 1 Output 2 Output 3 Output 4

a->b c->b a->b d->c y->a x->j ... ... ... a->b c->b d->c y->a x->j c->b y->a d->c x->j a->b

Count # of unique links Count # of unique links Count # of unique links Count # of unique links

slide-88
SLIDE 88

Computing PageRank

Output 1 Output 2 Output 3 Output 4

a->b c->b a->b d->c y->a x->j ... ... ... a->b c->b d->c y->a x->j c->b y->a d->c x->j a->b

Count # of unique links Count # of unique links Count # of unique links Count # of unique links Map

slide-89
SLIDE 89

Computing PageRank

Output 1 Output 2 Output 3 Output 4

a->b c->b a->b d->c y->a x->j ... ... ... a->b c->b d->c y->a x->j c->b y->a d->c x->j a->b

Count # of unique links Count # of unique links Count # of unique links Count # of unique links Map Shuffle

slide-90
SLIDE 90

Computing PageRank

Output 1 Output 2 Output 3 Output 4

a->b c->b a->b d->c y->a x->j ... ... ... a->b c->b d->c y->a x->j c->b y->a d->c x->j a->b

Count # of unique links Count # of unique links Count # of unique links Count # of unique links Map Shuffle Reduce

slide-91
SLIDE 91

Map Reduce as a Computational Paradigm

  • Generalized into a programming framework used to implement
slide-92
SLIDE 92

Map Reduce as a Computational Paradigm

  • Generalized into a programming framework used to implement
  • Running aggregation queries (e.g., on large amounts of data).
slide-93
SLIDE 93

Map Reduce as a Computational Paradigm

  • Generalized into a programming framework used to implement
  • Running aggregation queries (e.g., on large amounts of data).
  • Machine learning jobs of some kind.
slide-94
SLIDE 94

Map Reduce as a Computational Paradigm

  • Generalized into a programming framework used to implement
  • Running aggregation queries (e.g., on large amounts of data).
  • Machine learning jobs of some kind.
  • Various other things...
slide-95
SLIDE 95

Map Reduce Challenges

  • Fault tolerance: need to replicate data and remember locations.
  • Scheduling: minimize time and resources used.
  • Sharing the cluster across jobs.
  • Minimizing compute and network transfer time.
slide-96
SLIDE 96

Sensors or IoT

slide-97
SLIDE 97

Many Variants, Main Differences

  • Usually consider the case of sensors producing data.
slide-98
SLIDE 98

Many Variants, Main Differences

  • Usually consider the case of sensors producing data.
  • Want to compute on the aggregate data from sensors.
slide-99
SLIDE 99

Many Variants, Main Differences

  • Usually consider the case of sensors producing data.
  • Want to compute on the aggregate data from sensors.
  • For example, to provide early warning for volcanos, storms, earthquakes.
slide-100
SLIDE 100

Many Variants, Main Differences

  • Usually consider the case of sensors producing data.
  • Want to compute on the aggregate data from sensors.
  • For example, to provide early warning for volcanos, storms, earthquakes.
  • For example, to provide security against intruders.
slide-101
SLIDE 101

Many Variants, Main Differences

  • Usually consider the case of sensors producing data.
  • Want to compute on the aggregate data from sensors.
  • For example, to provide early warning for volcanos, storms, earthquakes.
  • For example, to provide security against intruders.
  • ...
slide-102
SLIDE 102

Challenges

  • Sensors have limited compute and power resources.
slide-103
SLIDE 103

Challenges

  • Sensors have limited compute and power resources.
  • Might not always be on, might be able to do a limited number of tasks.
slide-104
SLIDE 104

Challenges

  • Sensors have limited compute and power resources.
  • Might not always be on, might be able to do a limited number of tasks.
  • Communicate over wireless networks which might not always work reliably.
slide-105
SLIDE 105

Challenges

  • Sensors have limited compute and power resources.
  • Might not always be on, might be able to do a limited number of tasks.
  • Communicate over wireless networks which might not always work reliably.
  • Interference or change in distance might disconnect individual sensors.
slide-106
SLIDE 106

Thoughts on solutions?

slide-107
SLIDE 107

The Internet

slide-108
SLIDE 108

Many Problems, Focusing on One

  • There are many problems here.
slide-109
SLIDE 109

Many Problems, Focusing on One

  • There are many problems here.
  • A wide variety of requirements and tradeoffs.
slide-110
SLIDE 110

Many Problems, Focusing on One

  • There are many problems here.
  • A wide variety of requirements and tradeoffs.
  • Focusing on one specific problem here.
slide-111
SLIDE 111

Many Problems, Focusing on One

  • There are many problems here.
  • A wide variety of requirements and tradeoffs.
  • Focusing on one specific problem here.
  • Why? Seems like a problem that generalizes.
slide-112
SLIDE 112

Many Problems, Focusing on One

  • There are many problems here.
  • A wide variety of requirements and tradeoffs.
  • Focusing on one specific problem here.
  • Why? Seems like a problem that generalizes.
  • Also a problem I like.
slide-113
SLIDE 113

What is the Internet

A set of networks, each of which is owned by a different entity.

slide-114
SLIDE 114

What is the Internet

Must cooperate to get packets to a particular destination

slide-115
SLIDE 115

How to Get Cooperation

  • What is great about this model:
slide-116
SLIDE 116

How to Get Cooperation

  • What is great about this model:
  • Grows organically to include new areas, don't need a central authority.
slide-117
SLIDE 117

How to Get Cooperation

  • What is great about this model:
  • Grows organically to include new areas, don't need a central authority.
  • Concerns:
slide-118
SLIDE 118

How to Get Cooperation

  • What is great about this model:
  • Grows organically to include new areas, don't need a central authority.
  • Concerns:
  • Networks cost money, need to ensure economic incentives for transit.
slide-119
SLIDE 119

How to Get Cooperation

  • What is great about this model:
  • Grows organically to include new areas, don't need a central authority.
  • Concerns:
  • Networks cost money, need to ensure economic incentives for transit.
  • Policy/trust about what data is sent where.
slide-120
SLIDE 120

How to Get Cooperation

  • What is great about this model:
  • Grows organically to include new areas, don't need a central authority.
  • Concerns:
  • Networks cost money, need to ensure economic incentives for transit.
  • Policy/trust about what data is sent where.
  • ...
slide-121
SLIDE 121

How it Works Today

Have path to M: B->M Have path to S: B->S

slide-122
SLIDE 122

How it Works Today

Have path to M: B->M Have path to S: B->S Have path to B: M->B Have path to S: M->B->S ...

slide-123
SLIDE 123

How it Works Today

Do not consider paths from S

slide-124
SLIDE 124

How it Works Today

Do not consider paths from S Prefer paths from D

  • ver paths from B.
slide-125
SLIDE 125

How it Works Today

Do not consider paths from S Prefer paths from D

  • ver paths from B.

Prefer paths from M

  • ver paths from S.

Do not consider paths from F. ...

slide-126
SLIDE 126

How it Works Today

Do not consider paths from S Prefer paths from D

  • ver paths from B.

Prefer paths from M

  • ver paths from S.

Do not consider paths from F. ...

Combine policies and announcements to compute path.

slide-127
SLIDE 127

Problems

  • How to ensure paths are stable?
slide-128
SLIDE 128

Problems

  • How to ensure paths are stable?
  • How to ensure quick response after failure?
slide-129
SLIDE 129

Benefits

  • Range of policies that can be implemented?
slide-130
SLIDE 130

How to do better?

slide-131
SLIDE 131

Final Thoughts (of the semester)

slide-132
SLIDE 132

Final Thoughts

  • Given the end of Denard scaling, and what is popular today.
slide-133
SLIDE 133

Final Thoughts

  • Given the end of Denard scaling, and what is popular today.
  • If you write programs, very likely to be targeting distributed systems.
slide-134
SLIDE 134

Final Thoughts

  • Given the end of Denard scaling, and what is popular today.
  • If you write programs, very likely to be targeting distributed systems.
  • Probably hidden behind a few layers of abstraction.
slide-135
SLIDE 135

Final Thoughts

  • Given the end of Denard scaling, and what is popular today.
  • If you write programs, very likely to be targeting distributed systems.
  • Probably hidden behind a few layers of abstraction.
  • Given this remember just a few rules as you build systems.
slide-136
SLIDE 136

Final Thoughts

  • Given the end of Denard scaling, and what is popular today.
  • If you write programs, very likely to be targeting distributed systems.
  • Probably hidden behind a few layers of abstraction.
  • Given this remember just a few rules as you build systems.
  • Avoid coordination when possible, coordination is often slow.
slide-137
SLIDE 137

Final Thoughts

  • Given the end of Denard scaling, and what is popular today.
  • If you write programs, very likely to be targeting distributed systems.
  • Probably hidden behind a few layers of abstraction.
  • Given this remember just a few rules as you build systems.
  • Avoid coordination when possible, coordination is often slow.
  • But do not shun coordination in exchange for increased complexity.
slide-138
SLIDE 138

The End

Please stay to fill out evaluation forms.