61A Lecture 33 Monday, November 25 Announcements 2 Announcements - - PowerPoint PPT Presentation

61a lecture 33
SMART_READER_LITE
LIVE PREVIEW

61A Lecture 33 Monday, November 25 Announcements 2 Announcements - - PowerPoint PPT Presentation

61A Lecture 33 Monday, November 25 Announcements 2 Announcements Homework 10 due Tuesday 11/26 @ 11:59pm 2 Announcements Homework 10 due Tuesday 11/26 @ 11:59pm No lecture on Wednesday 11/27 or Friday 11/29 2 Announcements


slide-1
SLIDE 1

61A Lecture 33

Monday, November 25

slide-2
SLIDE 2

Announcements

2

slide-3
SLIDE 3

Announcements

  • Homework 10 due Tuesday 11/26 @ 11:59pm

2

slide-4
SLIDE 4

Announcements

  • Homework 10 due Tuesday 11/26 @ 11:59pm
  • No lecture on Wednesday 11/27 or Friday 11/29

2

slide-5
SLIDE 5

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

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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

slide-8
SLIDE 8

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

slide-9
SLIDE 9

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

slide-10
SLIDE 10

Addition in Logic

(Demo)

slide-11
SLIDE 11

Distributed Computing

slide-12
SLIDE 12

Distributed Computing

5

slide-13
SLIDE 13

Distributed Computing

A distributed computing application consists of multiple programs running on multiple computers that together coordinate to perform some task.

5

slide-14
SLIDE 14

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

slide-15
SLIDE 15

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

slide-16
SLIDE 16

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

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

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

slide-21
SLIDE 21

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

slide-22
SLIDE 22

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

slide-23
SLIDE 23

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

slide-24
SLIDE 24

Network Messages

6

slide-25
SLIDE 25

Network Messages

Computers communicate via messages: sequences of bytes transmitted over a network.

6

slide-26
SLIDE 26

Network Messages

Computers communicate via messages: sequences of bytes transmitted over a network. Messages can serve many purposes:

6

slide-27
SLIDE 27

Network Messages

Computers communicate via messages: sequences of bytes transmitted over a network. Messages can serve many purposes:

  • Send data to another computer

6

slide-28
SLIDE 28

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

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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

slide-31
SLIDE 31

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

slide-32
SLIDE 32

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

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

slide-35
SLIDE 35

Internet Protocol

slide-36
SLIDE 36

The Internet Protocol

8

slide-37
SLIDE 37

The Internet Protocol

The Internet Protocol (IP) specifies how to transfer packets of data among networks.

8

slide-38
SLIDE 38

The Internet Protocol

The Internet Protocol (IP) specifies how to transfer packets of data among networks.

  • Networks are inherently unreliable at any point.

8

slide-39
SLIDE 39

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

slide-40
SLIDE 40

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

slide-41
SLIDE 41

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

slide-42
SLIDE 42

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

slide-43
SLIDE 43

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

slide-44
SLIDE 44

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

slide-45
SLIDE 45

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

slide-46
SLIDE 46

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

slide-47
SLIDE 47

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 size IPv4

8

E.g., 192.168.1.1 All machines know IPv4

slide-48
SLIDE 48

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 size IPv4

8

Max length: 216 = 65,536 E.g., 192.168.1.1 All machines know IPv4

slide-49
SLIDE 49

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 size IPv4

8

Max length: 216 = 65,536 E.g., 192.168.1.1 All machines know IPv4

slide-50
SLIDE 50

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 size IPv4

8

Max length: 216 = 65,536 E.g., 192.168.1.1 All machines know IPv4 Decremented

  • n forwarding
slide-51
SLIDE 51

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 size IPv4

8

Max length: 216 = 65,536 E.g., 192.168.1.1 All machines know IPv4 Decremented

  • n forwarding
slide-52
SLIDE 52

Transmission Control Protocol

slide-53
SLIDE 53

10

Transmission Control Protocol

slide-54
SLIDE 54

The design of the Internet Protocol (IPv4) imposes constraints:

10

Transmission Control Protocol

slide-55
SLIDE 55

The design of the Internet Protocol (IPv4) imposes constraints:

  • Packets are limited to 65,535 bytes each.

10

Transmission Control Protocol

slide-56
SLIDE 56

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

slide-57
SLIDE 57

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

slide-58
SLIDE 58

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

slide-59
SLIDE 59

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

slide-60
SLIDE 60

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

slide-61
SLIDE 61

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

slide-62
SLIDE 62

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

slide-63
SLIDE 63

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

slide-64
SLIDE 64

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

slide-65
SLIDE 65

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

slide-66
SLIDE 66

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

slide-67
SLIDE 67

TCP Handshakes

11

slide-68
SLIDE 68

TCP Handshakes

All TCP connections begin with a sequence of messages called a "handshake" which verifies that communication is possible.

11

slide-69
SLIDE 69

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

slide-70
SLIDE 70

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

slide-71
SLIDE 71

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

slide-72
SLIDE 72

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

slide-73
SLIDE 73

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

slide-74
SLIDE 74

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

slide-75
SLIDE 75

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

slide-76
SLIDE 76

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

slide-77
SLIDE 77

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

slide-78
SLIDE 78

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

slide-79
SLIDE 79

Message Sequence of a TCP Connection

12

slide-80
SLIDE 80

Message Sequence of a TCP Connection

Computer A

12

slide-81
SLIDE 81

Message Sequence of a TCP Connection

Computer A Computer B

12

slide-82
SLIDE 82

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request

12

slide-83
SLIDE 83

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request

12

slide-84
SLIDE 84

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request Acknowledgement

12

slide-85
SLIDE 85

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request Acknowledgement

12

slide-86
SLIDE 86

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request Acknowledgement

Establishes packet numbering system

12

slide-87
SLIDE 87

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

..

slide-88
SLIDE 88

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

..

slide-89
SLIDE 89

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request Acknowledgement Termination signal Acknowledgement & termination signal

Establishes packet numbering system

12

..

Data message from A to B Data message from B to A

..

Acknowledgement Acknowledgement

..

slide-90
SLIDE 90

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request Acknowledgement Termination signal Acknowledgement & termination signal Acknowledgement

Establishes packet numbering system

12

..

Data message from A to B Data message from B to A

..

Acknowledgement Acknowledgement

..

slide-91
SLIDE 91

Message Sequence of a TCP Connection

Computer A Computer B

Synchronization request Acknowledgement & synchronization request Acknowledgement Termination signal Acknowledgement & termination signal Acknowledgement

Establishes packet numbering system

12

..

Data message from A to B Data message from B to A

..

Acknowledgement Acknowledgement

..

slide-92
SLIDE 92

Client/Server Architecture

slide-93
SLIDE 93

The Client/Server Architecture

14

slide-94
SLIDE 94

The Client/Server Architecture

One server provides information to multiple clients through request and response messages.

14

slide-95
SLIDE 95

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

slide-96
SLIDE 96

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

slide-97
SLIDE 97

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

slide-98
SLIDE 98

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

slide-99
SLIDE 99

Client/Server Example: The World Wide Web

15

slide-100
SLIDE 100

Client/Server Example: The World Wide Web

The client is a web browser (e.g., Firefox):

15

slide-101
SLIDE 101

Client/Server Example: The World Wide Web

The client is a web browser (e.g., Firefox):

  • Request content for a location.

15

slide-102
SLIDE 102

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

slide-103
SLIDE 103

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

slide-104
SLIDE 104

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

slide-105
SLIDE 105

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

slide-106
SLIDE 106

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

slide-107
SLIDE 107

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

slide-108
SLIDE 108

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

slide-109
SLIDE 109

The Hypertext Transfer Protocol

16

slide-110
SLIDE 110

The Hypertext Transfer Protocol

The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/ Server architecture.

16

slide-111
SLIDE 111

The Hypertext Transfer Protocol

The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/ Server architecture.

16

slide-112
SLIDE 112

The Hypertext Transfer Protocol

The Hypertext Transfer Protocol (HTTP) is a protocol designed to implement a Client/ Server architecture. Uniform resource locator (URL)

16

slide-113
SLIDE 113

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

slide-114
SLIDE 114

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

slide-115
SLIDE 115

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

slide-116
SLIDE 116

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

slide-117
SLIDE 117

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

slide-118
SLIDE 118

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

slide-119
SLIDE 119

Properties of a Client/Server Architecture

17

slide-120
SLIDE 120

Properties of a Client/Server Architecture

Benefits:

17

slide-121
SLIDE 121

Properties of a Client/Server Architecture

Benefits:

  • Creates a separation of concerns among components.

17

slide-122
SLIDE 122

Properties of a Client/Server Architecture

Benefits:

  • Creates a separation of concerns among components.
  • Enforces an abstraction barrier between client and server.

17

slide-123
SLIDE 123

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

slide-124
SLIDE 124

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

slide-125
SLIDE 125

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

slide-126
SLIDE 126

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

slide-127
SLIDE 127

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

slide-128
SLIDE 128

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

slide-129
SLIDE 129

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

slide-130
SLIDE 130

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

slide-131
SLIDE 131

Peer-to-Peer Architecture

slide-132
SLIDE 132

The Peer-to-Peer Architecture

19

slide-133
SLIDE 133

The Peer-to-Peer Architecture

All participants in a distributed application contribute computational resources: processing, storage, and network capacity.

19

slide-134
SLIDE 134

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

slide-135
SLIDE 135

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

slide-136
SLIDE 136

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

slide-137
SLIDE 137

Network Structure Concerns

http://en.wikipedia.org/wiki/File:P2P-network.svg

20

slide-138
SLIDE 138

Network Structure Concerns

Some data transfers on the Internet are faster than others.

http://en.wikipedia.org/wiki/File:P2P-network.svg

20

slide-139
SLIDE 139

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

slide-140
SLIDE 140

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

slide-141
SLIDE 141

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

slide-142
SLIDE 142

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

slide-143
SLIDE 143

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

slide-144
SLIDE 144

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

slide-145
SLIDE 145

Example: Skype

21

slide-146
SLIDE 146

Example: Skype

Skype is a Voice Over IP (VOIP) system that uses a hybrid peer-to-peer architecture.

21

slide-147
SLIDE 147

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

slide-148
SLIDE 148

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

slide-149
SLIDE 149

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

slide-150
SLIDE 150

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

slide-151
SLIDE 151

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

slide-152
SLIDE 152

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

slide-153
SLIDE 153

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 C Clients behind firewalls cannot communicate directly

slide-154
SLIDE 154

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 C A client not behind a firewall may be used as a supernode Clients behind firewalls cannot communicate directly

slide-155
SLIDE 155

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 C A client not behind a firewall may be used as a supernode Clients behind firewalls cannot communicate directly

slide-156
SLIDE 156

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 C A client not behind a firewall may be used as a supernode Clients behind firewalls cannot communicate directly