61a lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-distributed_… ·...
TRANSCRIPT
![Page 1: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/1.jpg)
61A Lecture 33
Monday, November 25
![Page 2: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/2.jpg)
Announcements
2
![Page 3: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/3.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
2
![Page 4: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/4.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
• No lecture on Wednesday 11/27 or Friday 11/29
2
![Page 5: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/5.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
• No lecture on Wednesday 11/27 or Friday 11/29
• No discussion section Wednesday 11/27 through Friday 11/29
2
![Page 6: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/6.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
• No lecture on Wednesday 11/27 or Friday 11/29
• No discussion section Wednesday 11/27 through Friday 11/29
!Lab will be held on Wednesday 11/27
2
![Page 7: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/7.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
• No lecture on Wednesday 11/27 or Friday 11/29
• No discussion section Wednesday 11/27 through Friday 11/29
!Lab will be held on Wednesday 11/27
• Recursive art contest entries due Monday 12/2 @ 11:59pm
2
![Page 8: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/8.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
• No lecture on Wednesday 11/27 or Friday 11/29
• No discussion section Wednesday 11/27 through Friday 11/29
!Lab will be held on Wednesday 11/27
• Recursive art contest entries due Monday 12/2 @ 11:59pm
• Guerrilla section about logic programming coming soon...
2
![Page 9: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/9.jpg)
Announcements
• Homework 10 due Tuesday 11/26 @ 11:59pm
• No lecture on Wednesday 11/27 or Friday 11/29
• No discussion section Wednesday 11/27 through Friday 11/29
!Lab will be held on Wednesday 11/27
• Recursive art contest entries due Monday 12/2 @ 11:59pm
• Guerrilla section about logic programming coming soon...
• Homework 11 due Thursday 12/5 @ 11:59pm
2
![Page 10: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/10.jpg)
Addition in Logic
(Demo)
![Page 11: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/11.jpg)
Distributed Computing
![Page 12: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/12.jpg)
Distributed Computing
5
![Page 13: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/13.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
5
![Page 14: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/14.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
5
![Page 15: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/15.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
5
![Page 16: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/16.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
5
![Page 17: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/17.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
5
![Page 18: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/18.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
• Computers are independent — they do not share memory.
5
![Page 19: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/19.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
• Computers are independent — they do not share memory.
• Coordination is enabled by messages passed across a network.
5
![Page 20: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/20.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
• Computers are independent — they do not share memory.
• Coordination is enabled by messages passed across a network.
• Individual programs have differentiating roles.
5
![Page 21: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/21.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
• Computers are independent — they do not share memory.
• Coordination is enabled by messages passed across a network.
• Individual programs have differentiating roles.
Distributed computing for large-scale data processing:
5
![Page 22: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/22.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
• Computers are independent — they do not share memory.
• Coordination is enabled by messages passed across a network.
• Individual programs have differentiating roles.
Distributed computing for large-scale data processing:
• Databases respond to queries over a network.
5
![Page 23: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/23.jpg)
Distributed Computing
A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.
• Computation is performed in parallel by many computers.
• Information can be restricted to certain computers.
• Redundancy and geographic diversity improve reliability.
Characteristics of distributed computing:
• Computers are independent — they do not share memory.
• Coordination is enabled by messages passed across a network.
• Individual programs have differentiating roles.
Distributed computing for large-scale data processing:
• Databases respond to queries over a network.
• Data sets can be partitioned across multiple machines (next lecture).
5
![Page 24: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/24.jpg)
Network Messages
6
![Page 25: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/25.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
6
![Page 26: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/26.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
6
![Page 27: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/27.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
6
![Page 28: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/28.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
6
![Page 29: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/29.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
• Instruct a program to call a function on some arguments.
6
![Page 30: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/30.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
• Instruct a program to call a function on some arguments.
• Transfer a program to be executed by another computer.
6
![Page 31: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/31.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
• Instruct a program to call a function on some arguments.
• Transfer a program to be executed by another computer.
Messages conform to a message protocol adopted by both the sender (to encode the message) & receiver (to interpret the message).
6
![Page 32: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/32.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
• Instruct a program to call a function on some arguments.
• Transfer a program to be executed by another computer.
Messages conform to a message protocol adopted by both the sender (to encode the message) & receiver (to interpret the message).
• For example, bits at fixed positions may have fixed meanings.
6
![Page 33: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/33.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
• Instruct a program to call a function on some arguments.
• Transfer a program to be executed by another computer.
Messages conform to a message protocol adopted by both the sender (to encode the message) & receiver (to interpret the message).
• For example, bits at fixed positions may have fixed meanings.
• Components of a message may be separated by delimiters.
6
![Page 34: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/34.jpg)
Network Messages
Computers communicate via messages: sequences of bytes transmitted over a network.
Messages can serve many purposes:
• Send data to another computer
• Request data from another computer
• Instruct a program to call a function on some arguments.
• Transfer a program to be executed by another computer.
Messages conform to a message protocol adopted by both the sender (to encode the message) & receiver (to interpret the message).
• For example, bits at fixed positions may have fixed meanings.
• Components of a message may be separated by delimiters.
• Protocols are designed to be implemented by many different programming languages on many different types of machines.
6
![Page 35: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/35.jpg)
Internet Protocol
![Page 36: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/36.jpg)
The Internet Protocol
8
![Page 37: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/37.jpg)
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
8
![Page 38: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/38.jpg)
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
8
![Page 39: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/39.jpg)
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
8
![Page 40: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/40.jpg)
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
8
![Page 41: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/41.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
8
![Page 42: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/42.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
IPv4
8
![Page 43: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/43.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
IPv4
8
All machines know IPv4
![Page 44: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/44.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
IPv4
8
All machines know IPv4
![Page 45: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/45.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
Where to send error reports
IPv4
8
All machines know IPv4
![Page 46: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/46.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
Where to send error reports
IPv4
8
E.g.,192.168.1.1
All machines know IPv4
![Page 47: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/47.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
Where to send error reports
The packet knows its sizeIPv4
8
E.g.,192.168.1.1
All machines know IPv4
![Page 48: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/48.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
Where to send error reports
The packet knows its sizeIPv4
8
Max length: 216 = 65,536
E.g.,192.168.1.1
All machines know IPv4
![Page 49: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/49.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
Where to send error reports
Packets can't survive forever
The packet knows its sizeIPv4
8
Max length: 216 = 65,536
E.g.,192.168.1.1
All machines know IPv4
![Page 50: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/50.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Where to send the packet
Where to send error reports
Packets can't survive forever
The packet knows its sizeIPv4
8
Max length: 216 = 65,536
E.g.,192.168.1.1
All machines know IPv4
Decremented on forwarding
![Page 51: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/51.jpg)
http://en.wikipedia.org/wiki/IPv4
The Internet Protocol
The Internet Protocol (IP) specifies how to transfer packets of data among networks.
• Networks are inherently unreliable at any point.
• The structure of a network is dynamic, not fixed.
• No system exists to monitor or track communications.
Packets are forwarded toward their destination on a best effort basis.
Programs that use IP typically need a policy for handling lost packets.
Where to send the packet
Where to send error reports
Packets can't survive forever
The packet knows its sizeIPv4
8
Max length: 216 = 65,536
E.g.,192.168.1.1
All machines know IPv4
Decremented on forwarding
![Page 52: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/52.jpg)
Transmission Control Protocol
![Page 53: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/53.jpg)
10
Transmission Control Protocol
![Page 54: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/54.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
10
Transmission Control Protocol
![Page 55: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/55.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
10
Transmission Control Protocol
![Page 56: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/56.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
10
Transmission Control Protocol
![Page 57: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/57.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
10
Transmission Control Protocol
![Page 58: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/58.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
10
Transmission Control Protocol
![Page 59: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/59.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
10
Transmission Control Protocol
![Page 60: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/60.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
10
Transmission Control Protocol
![Page 61: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/61.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
• Each packet in a TCP session has a sequence number:
10
Transmission Control Protocol
![Page 62: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/62.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
• Each packet in a TCP session has a sequence number:!The receiver can correctly order packets that arrive out of order.
10
Transmission Control Protocol
![Page 63: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/63.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
• Each packet in a TCP session has a sequence number:!The receiver can correctly order packets that arrive out of order.!The receiver can ignore duplicate packets.
10
Transmission Control Protocol
![Page 64: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/64.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
• Each packet in a TCP session has a sequence number:!The receiver can correctly order packets that arrive out of order.!The receiver can ignore duplicate packets.
• All received packets are acknowledged; both parties know that transmission succeeded.
10
Transmission Control Protocol
![Page 65: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/65.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
• Each packet in a TCP session has a sequence number:!The receiver can correctly order packets that arrive out of order.!The receiver can ignore duplicate packets.
• All received packets are acknowledged; both parties know that transmission succeeded.
• Packets that aren't acknowledged are sent repeatedly.
10
Transmission Control Protocol
![Page 66: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/66.jpg)
The design of the Internet Protocol (IPv4) imposes constraints:
• Packets are limited to 65,535 bytes each.
• Packets may arrive in a different order than they were sent.
• Packets may be duplicated or lost.
The Transmission Control Protocol (TCP) improves reliability:
• Ordered, reliable transmission of arbitrary byte streams.
• Implemented using the IP. Every TCP connection involves sending IP packets.
• Each packet in a TCP session has a sequence number:!The receiver can correctly order packets that arrive out of order.!The receiver can ignore duplicate packets.
• All received packets are acknowledged; both parties know that transmission succeeded.
• Packets that aren't acknowledged are sent repeatedly.
The socket module in Python implements the TCP.
10
Transmission Control Protocol
![Page 67: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/67.jpg)
TCP Handshakes
11
![Page 68: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/68.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
11
![Page 69: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/69.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
11
![Page 70: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/70.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
11
![Page 71: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/71.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
11
![Page 72: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/72.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
11
![Page 73: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/73.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
• Lots of separate connections can exist without any confusion.
11
![Page 74: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/74.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
• Lots of separate connections can exist without any confusion.
• The number of required messages is minimized.
11
![Page 75: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/75.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
• Lots of separate connections can exist without any confusion.
• The number of required messages is minimized.
Communication Rules:
11
![Page 76: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/76.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
• Lots of separate connections can exist without any confusion.
• The number of required messages is minimized.
Communication Rules:
• Computer A can send an initial message to Computer B requesting a new connection.
11
![Page 77: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/77.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
• Lots of separate connections can exist without any confusion.
• The number of required messages is minimized.
Communication Rules:
• Computer A can send an initial message to Computer B requesting a new connection.
• Computer B can respond to messages from Computer A.
11
![Page 78: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/78.jpg)
TCP Handshakes
All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.
"Can you hear me now?" Let's design a handshake protocol.
Handshake Goals:
• Computer A knows that it can send data to and receive data from Computer B.
• Computer B knows that it can send data to and receive data from Computer A.
• Lots of separate connections can exist without any confusion.
• The number of required messages is minimized.
Communication Rules:
• Computer A can send an initial message to Computer B requesting a new connection.
• Computer B can respond to messages from Computer A.
• Computer A can respond to messages from Computer B.
11
![Page 79: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/79.jpg)
Message Sequence of a TCP Connection
12
![Page 80: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/80.jpg)
Message Sequence of a TCP Connection
Computer A
12
![Page 81: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/81.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
12
![Page 82: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/82.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
12
![Page 83: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/83.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
12
![Page 84: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/84.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
12
![Page 85: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/85.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
12
![Page 86: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/86.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
Establishes packet numbering system
12
![Page 87: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/87.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
Establishes packet numbering system
12
..
Data message from A to B
Data message from B to A
..Acknowledgement
Acknowledgement
..
![Page 88: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/88.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
Termination signal
Establishes packet numbering system
12
..
Data message from A to B
Data message from B to A
..Acknowledgement
Acknowledgement
..
![Page 89: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/89.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
Termination signalAcknowledgement & termination signal
Establishes packet numbering system
12
..
Data message from A to B
Data message from B to A
..Acknowledgement
Acknowledgement
..
![Page 90: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/90.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
Termination signalAcknowledgement & termination signal
Acknowledgement
Establishes packet numbering system
12
..
Data message from A to B
Data message from B to A
..Acknowledgement
Acknowledgement
..
![Page 91: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/91.jpg)
Message Sequence of a TCP Connection
Computer A Computer B
Synchronization request
Acknowledgement & synchronization request
Acknowledgement
Termination signalAcknowledgement & termination signal
Acknowledgement
Establishes packet numbering system
12
..
Data message from A to B
Data message from B to A
..Acknowledgement
Acknowledgement
..
![Page 92: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/92.jpg)
Client/Server Architecture
![Page 93: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/93.jpg)
The Client/Server Architecture
14
![Page 94: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/94.jpg)
The Client/Server Architecture
One server provides information to multiple clients through request and response messages.
14
![Page 95: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/95.jpg)
The Client/Server Architecture
One server provides information to multiple clients through request and response messages.
Server role: Respond to service requests with requested information.
14
![Page 96: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/96.jpg)
The Client/Server Architecture
One server provides information to multiple clients through request and response messages.
Server role: Respond to service requests with requested information.
Client role: Request information and make use of the response.
14
![Page 97: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/97.jpg)
The Client/Server Architecture
One server provides information to multiple clients through request and response messages.
Server role: Respond to service requests with requested information.
Client role: Request information and make use of the response.
Abstraction: The client knows what service a server provides, but not how it is provided.
14
![Page 98: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/98.jpg)
The Client/Server Architecture
One server provides information to multiple clients through request and response messages.
Server role: Respond to service requests with requested information.
Client role: Request information and make use of the response.
Abstraction: The client knows what service a server provides, but not how it is provided.
14
![Page 99: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/99.jpg)
Client/Server Example: The World Wide Web
15
![Page 100: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/100.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
15
![Page 101: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/101.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
15
![Page 102: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/102.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
15
![Page 103: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/103.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
The server is a web server:
15
![Page 104: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/104.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
The server is a web server:
• Interpret requests and respond with content.
15
![Page 105: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/105.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
The server is a web server:
• Interpret requests and respond with content.
Web browser Web server
TCP Initialization Handshake
15
![Page 106: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/106.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
The server is a web server:
• Interpret requests and respond with content.
HTTP GET request of content
Web browser Web server
TCP Initialization Handshake
15
![Page 107: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/107.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
The server is a web server:
• Interpret requests and respond with content.
HTTP GET request of content
HTTP response with content
Web browser Web server
TCP Initialization Handshake
15
![Page 108: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/108.jpg)
Client/Server Example: The World Wide Web
The client is a web browser (e.g., Firefox):
• Request content for a location.
• Interpret the content for the user.
The server is a web server:
• Interpret requests and respond with content.
HTTP GET request of content
HTTP response with content
Follow-up requests for auxiliary content
...
Web browser Web server
TCP Initialization Handshake
15
![Page 109: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/109.jpg)
The Hypertext Transfer Protocol
16
![Page 110: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/110.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
16
![Page 111: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/111.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
16
![Page 112: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/112.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Uniform resource locator (URL)
16
![Page 113: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/113.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Browser issues a GET request to a server at www.nytimes.com for the content (resource) at location "pages/todayspaper".
Uniform resource locator (URL)
16
![Page 114: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/114.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Browser issues a GET request to a server at www.nytimes.com for the content (resource) at location "pages/todayspaper".
Uniform resource locator (URL)
Server response contains more than just the resource itself:
16
![Page 115: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/115.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Browser issues a GET request to a server at www.nytimes.com for the content (resource) at location "pages/todayspaper".
Uniform resource locator (URL)
Server response contains more than just the resource itself:
• Status code, e.g. 200 OK, 404 Not Found, 403 Forbidden, etc.
16
![Page 116: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/116.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Browser issues a GET request to a server at www.nytimes.com for the content (resource) at location "pages/todayspaper".
Uniform resource locator (URL)
Server response contains more than just the resource itself:
• Status code, e.g. 200 OK, 404 Not Found, 403 Forbidden, etc.
• Date of response; type of server responding
16
![Page 117: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/117.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Browser issues a GET request to a server at www.nytimes.com for the content (resource) at location "pages/todayspaper".
Uniform resource locator (URL)
Server response contains more than just the resource itself:
• Status code, e.g. 200 OK, 404 Not Found, 403 Forbidden, etc.
• Date of response; type of server responding
• Last-modified time of the resource
16
![Page 118: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/118.jpg)
The Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/Server architecture.
Browser issues a GET request to a server at www.nytimes.com for the content (resource) at location "pages/todayspaper".
Uniform resource locator (URL)
Server response contains more than just the resource itself:
• Status code, e.g. 200 OK, 404 Not Found, 403 Forbidden, etc.
• Date of response; type of server responding
• Last-modified time of the resource
• Type of content and length of content
16
![Page 119: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/119.jpg)
Properties of a Client/Server Architecture
17
![Page 120: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/120.jpg)
Properties of a Client/Server Architecture
Benefits:
17
![Page 121: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/121.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
17
![Page 122: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/122.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
17
![Page 123: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/123.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
17
![Page 124: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/124.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
17
![Page 125: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/125.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
• A single point of failure: the server.
17
![Page 126: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/126.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
• A single point of failure: the server.
• Computing resources become scarce when demand increases.
17
![Page 127: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/127.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
• A single point of failure: the server.
• Computing resources become scarce when demand increases.
Common use cases:
17
![Page 128: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/128.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
• A single point of failure: the server.
• Computing resources become scarce when demand increases.
Common use cases:
• Databases — The database serves responses to query requests.
17
![Page 129: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/129.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
• A single point of failure: the server.
• Computing resources become scarce when demand increases.
Common use cases:
• Databases — The database serves responses to query requests.
• Open Graphics Library (OpenGL) — A graphics processing unit (GPU) serves images to a central processing unit (CPU).
17
![Page 130: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/130.jpg)
Properties of a Client/Server Architecture
Benefits:
• Creates a separation of concerns among components.
• Enforces an abstraction barrier between client and server.
• A centralized server can reuse computation across clients.
Liabilities:
• A single point of failure: the server.
• Computing resources become scarce when demand increases.
Common use cases:
• Databases — The database serves responses to query requests.
• Open Graphics Library (OpenGL) — A graphics processing unit (GPU) serves images to a central processing unit (CPU).
• Internet file and resource transfer: HTTP, FTP, email, etc.
17
![Page 131: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/131.jpg)
Peer-to-Peer Architecture
![Page 132: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/132.jpg)
The Peer-to-Peer Architecture
19
![Page 133: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/133.jpg)
The Peer-to-Peer Architecture
All participants in a distributed application contribute computational resources: processing, storage, and network capacity.
19
![Page 134: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/134.jpg)
The Peer-to-Peer Architecture
All participants in a distributed application contribute computational resources: processing, storage, and network capacity.
Messages are relayed through a network of participants.
19
![Page 135: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/135.jpg)
The Peer-to-Peer Architecture
All participants in a distributed application contribute computational resources: processing, storage, and network capacity.
Messages are relayed through a network of participants.
Each participant has only partial knowledge of the network.
19
![Page 136: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/136.jpg)
The Peer-to-Peer Architecture
All participants in a distributed application contribute computational resources: processing, storage, and network capacity.
Messages are relayed through a network of participants.
Each participant has only partial knowledge of the network.
http://en.wikipedia.org/wiki/File:P2P-network.svg 19
![Page 137: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/137.jpg)
Network Structure Concerns
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 138: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/138.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 139: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/139.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
The time required to transfer a message through a peer-to-peer network depends on the route chosen.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 140: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/140.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
The time required to transfer a message through a peer-to-peer network depends on the route chosen.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 141: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/141.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
The time required to transfer a message through a peer-to-peer network depends on the route chosen.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 142: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/142.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
The time required to transfer a message through a peer-to-peer network depends on the route chosen.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 143: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/143.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
The time required to transfer a message through a peer-to-peer network depends on the route chosen.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 144: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/144.jpg)
Network Structure Concerns
Some data transfers on the Internet are faster than others.
The time required to transfer a message through a peer-to-peer network depends on the route chosen.
http://en.wikipedia.org/wiki/File:P2P-network.svg 20
![Page 145: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/145.jpg)
Example: Skype
21
![Page 146: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/146.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
21
![Page 147: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/147.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
21
![Page 148: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/148.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
21
![Page 149: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/149.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
![Page 150: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/150.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A
![Page 151: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/151.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A Client B
![Page 152: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/152.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A Client B
Clients behind firewalls cannot
communicate directly
![Page 153: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/153.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A Client B
Client CClients behind
firewalls cannot communicate directly
![Page 154: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/154.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A Client B
Client CA client not behind a firewall may be used
as a supernode
Clients behind firewalls cannot
communicate directly
![Page 155: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/155.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A Client B
Client CA client not behind a firewall may be used
as a supernode
Clients behind firewalls cannot
communicate directly
![Page 156: 61A Lecture 33 - inst.eecs.berkeley.edu › ~cs61a › fa13 › slides › 33-Distributed_… · •No lecture on Wednesday 11/27 or Friday 11/29 •No discussion section Wednesday](https://reader036.vdocuments.net/reader036/viewer/2022081407/5f22d37bfa31f101637330e8/html5/thumbnails/156.jpg)
Example: Skype
Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.
Login & contacts are handled via a centralized server.
Conversations between two computers that cannot send messages to each other directly are relayed through supernodes.
Any Skype client with its own IP address may be a supernode.
21
Client A Client B
Client CA client not behind a firewall may be used
as a supernode
Clients behind firewalls cannot
communicate directly