CS61A Lecture 28 Distributed Computing Jom Magrotker UC Berkeley EECS August 6, 2012.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

RPC Robert Grimm New York University Remote Procedure Calls.
Course Introduction & Overview
Lecture 12 Page 1 CS 111 Online Devices and Device Drivers CS 111 On-Line MS Program Operating Systems Peter Reiher.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Real-Time Authentication Using Digital Signature Schema Marissa Hollingsworth BOISECRYPT ‘09.
Layer 7- Application Layer
Computer Science 162 Section 1 CS162 Teaching Staff.
Architecture, Deployment Diagrams, Web Modeling Elizabeth Bigelow CS-15499C October 6, 2000.
Principles of Information Technology
Introduction to Software Engineering CS-300 Fall 2005 Supreeth Venkataraman.
SM3121 Software Technology Mark Green School of Creative Media.
Introduction to client/server architecture
Fundamentals of Python: From First Programs Through Data Structures
CorissLine TM Dean of Graduate Studies Capitol College Chief Technology Officer Coriss.Net,
C LIENT /S ERVER AND P EER TO P EER National 4/5 Computing Science.
CS61A Lecture 2 Functions and Applicative Model of Computation Tom Magrino and Jon Kotker UC Berkeley EECS June 19, 2012.
For more notes and topics visit:
INTRODUCTION TO WEB DATABASE PROGRAMMING
Computer Network By Tahir Saad. Introduction to computer networking Content : The definitions of networking Use of network Network classification.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 6 Basic TCP/IP Services.
Application Protocols: ELECTRONIC MAIL (SMTP, POP) CSNB534 Semester 2, 2007/2008 Asma Shakil.
Networks Types & Topologies. Objectives  To understand the two different setup of networks and their characteristics  Know the 3 different types of.
Networks and Hackers Copyright © Texas Education Agency, All rights reserved. 1.
Protocol Architectures. Simple Protocol Architecture Not an actual architecture, but a model for how they work Similar to “pseudocode,” used for teaching.
Version 4.0. Objectives Describe how networks impact our daily lives. Describe the role of data networking in the human network. Identify the key components.
Wyatt Pearsall November  HyperText Transfer Protocol.
1 VU. 2 CS101 Introduction to Computing Lecture 15 More on Interactive Forms (Web Development Lecture 5)
Introduction to JavaScript + More on Interactive Forms.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
9.351 Systems Analysis & DesignDistributed Systems & User Interface1 Distributed Systems Distributed system = IS that contains a network component and.
CS61A Lecture 21 Scheme Jom Magrotker UC Berkeley EECS July 24, 2012.
PPT Slides by Dr. Craig Tyran & Kraig Pencil Computer Networking – Part 1 MIS 320 Kraig Pencil Summer 2014.
Chapter 1 Place Value. Introduction 1.2a  Mix-N-Match  Find all students who have the same number represented on their card.  There are groups of 3.
Copyright © Curt Hill, Client – Server Computing An important paradigm.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Personal Computer - Stand- Alone Database  Database (or files) reside on a PC - on the hard disk.  Applications run on the same PC and directly access.
Step 2: Inviting to Challenge Group. DON’T! Before getting into the training, it’s important that you DON’T just randomly send someone a message asking.
by Maria Rita Marruganti DIFFERENT WAYS OF SENDING INFORMATION Passive e.g. newspapers, radio, television. You don’t produce, just receive information.
CS61A Lecture 23 Py Jom Magrotker UC Berkeley EECS July 26, 2012.
Network Operating Systems : Tasks and Examples Instructor: Dr. Najla Al-Nabhan
CSC480 Software Engineering Lecture 10 September 25, 2002.
CS61A Lecture 27 Logic Programming Jom Magrotker UC Berkeley EECS August 2, 2012.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
I NTRODUCTION TO N ETWORK A DMINISTRATION. W HAT IS A N ETWORK ? A network is a group of computers connected to each other to share information. Networks.
Monday September 14th, 2015 Planner: – HW: Safety rules poster due Wed. 9/16 – Safety Quiz tomorrow - based on rules You Need: – Today: Daily 5 To Do:
CS61A Lecture 20 Object-Oriented Programming: Implementation Jom Magrotker UC Berkeley EECS July 23, 2012.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
Communications & Networks National 4 & 5 Computing Science.
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
Computer Network Architecture Lecture 2: Fundamental of Network.
Internet Flow By: Terry Hernandez. Getting from the customers computer onto the internet Internet Browser
CS61A Lecture 10 Immutable Data Structures Jom Magrotker UC Berkeley EECS July 3, 2012.
COM: 111 Introduction to Computer Applications Department of Information & Communication Technology Panayiotis Christodoulou.
Web Services Blake Schernekau March 27 th, Learning Objectives Understand Web Services Understand Web Services Figure out SOAP and what it is used.
Classic Connections: Innovative Methods for Making Education Work.
Computer Networks.  Which is the best definition of a circuit switched network?  An electric circuit where the connections get switched based on who.
NT1210 Introduction to Networking
CS61A Lecture 29 Parallel Computing Jom Magrotker UC Berkeley EECS August 7, 2012.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
A service Oriented Architecture & Web Service Technology.
Component 2 6G, H, I, J, K.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Client-Server Interaction
Chapter 27 WWW and HTTP.
Presentation transcript:

CS61A Lecture 28 Distributed Computing Jom Magrotker UC Berkeley EECS August 6, 2012

2 C OMPUTER S CIENCE IN THE N EWS

3 T ODAY Distributed Computing – Network Architecture – Protocol – Design Ideas A Chat Program (with a demo, fingers crossed)

4 R EVIEW : L OGIC P ROGRAMMING Write the rule rotate_left, which checks that the second input list is the result of taking the first list and shifting the first item to the back of the list. P?> rotate_left(, ) Yes. P?> rotate_left(, ?wat) Yes. ?wat =

5 R EVIEW : L OGIC P ROGRAMMING Write the rule rotate_left, which checks that the second input list is the result of taking the first list and shifting the first item to the back of the list. rule append(, ?s, ): append(?r, ?s, ?a) fact append(<>, ?z, ?z) fact rotate_left(<>, <>) rule rotate_left(, ?rotated): append(?rest,, ?rotated)

6 R EVIEW : L OGIC P ROGRAMMING Write the rule rotate_right, which checks that the second input list is the result of taking the first list and shifting the last item to the front of the list. P?> rotate_right(, ) Yes. P?> rotate_right(, ?wat) Yes. ?wat =

7 R EVIEW : L OGIC P ROGRAMMING Write the rule rotate_right, which checks that the second input list is the result of taking the first list and shifting the last item to the front of the list. rule rotate_right(?first, ?second): rotate_left(?second, ?first)

8 S O F AR functions data structures objects abstraction interpretation evaluation One Program One Computer

9 T ODAY & T OMORROW Multiple Programs! – On Multiple Computers (Networked and Distributed Computing) – On One Computer (Concurrency and Parallelism)

10 T ODAY : D ISTRIBUTED C OMPUTING Programs on different computers working together towards a goal. – Information Sharing & Communication Ex. Skype, The World Wide Web, Cell Networks – Large Scale Computing Ex. “Cloud Computing” and Map-Reduce

11 D ISTRIBUTED C OMPUTING 1.Independent Computers 2.(Often) In Different Locations 3.Connected by a Network 4.Communicating by Passing Messages 5.Shared Computational Goal

12 T OPICS IN D ISTRIBUTED C OMPUTING Architecture – Client-Server – Peer-to-Peer Message Passing Design Principles – Modularity – Interfaces

13 C LIENT -S ERVER A RCHITECTURE Great for dispensing a service. 2 Roles: Clients: make requests to the server. Server: listens for requests and responds to them. Request Response SERVER CLIENT

14 C LIENT -S ERVER A RCHITECTURE The Trick: Where to put different features? Example: “Should I store X data with the client or the server?” Request Response SERVER CLIENT

Example: The World Wide Web Server: Holds content. (Constantly) listens for clients to request content. Sometimes performs computation before responding. Client: Requests content. Makes (correctly formatted) requests to the server for content. Responsible for making sense of the response. Make a request. Get a response. Figures out the proper web page to give back. Figures out how to display the web page that it got.

16 D IVISION OF L ABOR The Client The Server Many Consumers Make requests on behalf of the user. Make responses useful for the user. Single source Be ready to handle incoming requests. Perform necessary computation to produce a response.

17 S INGLE P OINT OF F AILURE What happens if the server goes down? Everything stops working for everyone! What if the client goes down? Only that client stops working, everyone else continues as needed.

18 P EER TO P EER A RCHITECTURE Great for distributing load among a large pool of computers. All computers: Send and receive data. Contribute resources. Useful for: Data Storage Large-scale Computation Communication

19 P EER TO P EER A RCHITECTURE Advantages: No single point of failure. Can scale with demand. Disadvantages: Gets pretty complex. Inefficient communication.

20 A NNOUNCEMENTS Project 4 due Tuesday, August 7. – Partnered project, in two parts. – Twelve questions, so please start early! – Two extra credit questions. Homework 14 due Tuesday, August 7. – Will include contest voting later today. – Assignment is short.

21 A NNOUNCEMENTS : F INAL Final is Thursday, August 9. – Where? 1 Pimentel. – When? 6PM to 9PM. – How much? All of the material in the course, from June 18 to August 8, will be tested. Closed book and closed electronic devices. One 8.5” x 11” ‘cheat sheet’ allowed. No group portion. We have ed you if you have conflicts and have told us. If you haven’t told us yet, please let us know by yesterday. Final review sessions on Tonight, August 6 and Tomorrow, August 7, from 8pm to 9:30pm in the HP Auditorium (306 Soda).

22 C OMMUNICATING Computers need to be able to send messages back and forth to... – Coordinate behavior. – Transfer data. – Make requests. – Indicate status of a request

23 M ESSAGE S TRUCTURE There has to be a predefined message structure if computers are to understand one another. Similar to how people need to agree on a language if they are to communicate effectively.

24 M ESSAGE S TRUCTURE Typically a message includes something like: – Sender – Receiver – Action or Response However, message format can vary a lot with the application. To: Alice From: Bob Please tell me the daily special.

25 P ROTOCOL For a distributed system to work, we need to have standardized methods for talking to each other. A protocol is the formalisms expected when programs talk to one another. One example is the message format. Another example: What’s the convention used for two computers starting up a conversation with one another?

26 T HE T HREE W AY H ANDSHAKE Extremely common protocol for establishing two-way communication. “Hello, can you hear me?” “Yes, I can hear you. Can you hear me?” “Yep, I hear you. Let’s talk!”

27 T HE T HREE W AY H ANDSHAKE Why 3 ways? Need to make sure both sides are hearing each other! 1.First message is to try to see if the first computer can be heard. 2.Second message confirms that the first computer can be heard and acts as a test to make sure the second computer can also be heard. 3.Third message confirms the second computer can be heard.

28 B REAK

29 D EMO : C HAT P ROGRAM At this point we’re going to attempt demo-ing the chat program you’ll be working with in lab today. It’s not exactly the most robust chat server, so we’ll see how it goes.

30 D ESIGN P RINCIPLES IN D ISTRIBUTED S YSTEMS The idea of abstraction is still important for this style of programming! The goal is to make each part of the distributed system as modular as possible. Should be able to switch out any component with something that behaves the same way without any noticeable changes.

31 M ODULARITY Modularity is achieved by defining and adhering to interfaces, so that they may be treated as black boxes by other components. Advantages: – Can swap out better implementations later on without everything breaking. – You can test different parts by “mocking-up” the interfaces for other components.

32 C ONCLUSION Distributed systems exist in a variety of flavors, we talked about a few major categories. In distributed systems, the formatting of messages and the protocols for communication determine the ways in which different parts of the system interact. An extremely common protocol is the 3 way handshake for establishing connections. An important design principle in distributed systems is modularity, each part should follow an interface so that it is easy to swap out if necessary. Preview: Multiple programs running at the same time on the computer. Using distributed computing to handle enormous tasks.