distributed systems [fall 2015] g22.3033-002 lec 1: course introduction

24
Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Upload: moris-sharp

Post on 21-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Distributed systems [Fall 2015]

G22.3033-002

Lec 1: Course Introduction

Page 2: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Waitlist status

• Many people are wait-listed

• If you are not going to take the class, drop early to let others in

Page 3: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Class staff

• Instructor: Prof. Jinyang Li (me)– [email protected]– Office Hour: Thu 5-6pm (715 Bway Rm 708)

• Teaching Assistant: Lamont Nelson– [email protected]– Office Hour: TBA or by appointment (715 Bway

Rm 707)

• Grader: Quanlu Zhang

Page 4: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Background

• What I assume you already know:– Familiar with OS & networking– Substantial programming experience – Concurrency and threading

Page 5: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Course readings• No official textbook• Lectures are based on research papers

– Check webpage for schedules

• Useful reference books– Principles of Computer System Design. (Saltzer and

Kaashoek)– Distributed Systems (Tanenbaum and Steen)

Page 6: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Meeting times & Lecture structure

• Tuesdays 5:10-7pm – With a 10-minute break in the middle

• Lecture will do basic concepts followed by paper discussion– Read assigned papers before lecture

• Instructional assistant will do a few optional recitations on labs.

Page 7: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Potential recitation times

• Friday 5-6pm

• Friday 6-7pm

• Monday 7-8pm

• Wednesday 7-8pm

Page 8: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Important addresses

• URL: http://www.news.cs.nyu.edu/~jinyang/fa15-ds– Check regularly for schedule

• We’ll use Piazza.com for making announcements and conducting discussion

• Please check piazza.com to enter your preferences for the recitation time

Page 9: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

How are you evaluated?

• Participation 5%• Labs 35% ( 5 programming assignments in

Go)• Quizzes 60%

– mid-term and final (90 minutes each)

Page 10: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Using Piazza

• Please post all questions on Piazza • You can post either anonymously or as yourself.• We encourage you to answer others’ questions.

– It counts as your class participation.

Page 11: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Questions?

Page 12: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

What are distributed systems?

Multiple hosts

A local or wide area network

Machines communicate to provide some service for applications

Page 13: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Why distributed systems?for ease-of-use

• Handle geographic separation

• Provide users (or applications) with location transparency:

• Examples:– Web: access information with a few “clicks”– Network file system: access files on remote

servers as if they are on a local disk, share files among multiple computers

Page 14: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Why distributed systems?for availability

• Build a reliablesystem out of unreliable parts– Hardware can fail: power outage, disk failures,

memory corruption, network switch failures…– Software can fail: bugs, mis-configuration,

upgrade …– How to achieve 0.99999 availability?

• Examples:– Amazon’s S3 key-value store

Page 15: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Why distributed systems?for scalable capacity

• Aggregate the resources (CPU, bandwidth, disk) of many computers

• Examples?– CPU: MapReduce, Spark, Grid computing– Bandwidth: Akamai CDN, BitTorrent– Disk: Google file system, Hadoop File System

Page 16: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Why distributed systems?for modular functionality

• Only need to build a service to accomplish a single task well. – Authentication server– Backup server.

• Compose multiple simple services to achieve sophisticated functionality– A distributed file system: a block service + a

meta-data lookup service

Page 17: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

The downside

A distributed system is a system in which I can’t do my work because some computer that I’ve never even heard of has failed.”

-- Leslie Lamport

• Much more complex

Page 18: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Main topics in distributed systems

Page 19: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

Distributed systems

Local storage

NetworkLocal CPU

Applications( web search, Facebook, Whatsapp...)

#1 Abstraction & Interface

Page 20: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

#1 Abstraction & Interface

• Application users access your service via some interface

• An example, a storage service’s API:– File system (mkdir, readdir, write, read)– Database (create tables, SQL queries)– Disk (read block, write block)

• Conflicting goals: – Simple, Flexible, Efficient to implement

Page 21: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

#2 System architecture

• Where to run the system?– Data center or wide area?

• How is system functionality spread across machines?– Client/server?– Peer-to-peer?– A single master?

Page 22: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

#3: Fault Tolerance

• How to keep the system running when some machine is down?

• Dropbox operates on ~10,000 servers, how to read files when some are down?

• Replication: store the same data on multiple servers.

• Does the system still give “correct” data?

Page 23: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

#4: Consistency

• Contract with apps/users about meaning of operations. Difficult due to:– Failure, multiple copies of data, concurrency

• E.g. how to keep 2 replicas “identical”– If one is down, it will miss updates– If net is broken, both might process different

updates

Page 24: Distributed systems [Fall 2015] G22.3033-002 Lec 1: Course Introduction

#5 Performance• Latency & Throughput

• To increase throughput, exploit parallelism– Many resources exist in multiples

• CPU cores, IO and CPU

– Need ways to divide the load

• To reduce latency, – Figure out what takes time: queuing, network,

storage, some expensive algorithm, many serial steps?