• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/80

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

80 Cards in this Set

  • Front
  • Back

Possible structure of applications:

  • client-server
  • peer-to-peer (P2P)

Characteristics of a server on a


client-server architecture

  • Always-on host
  • Permanent IP address
  • Data centers for scaling

Characteristics of clients on a


client-server architecture

  • Communicate with server
  • May be intermittently connected
  • May have dynamic IP addresses
  • Do not communicate directly with each other

Peer-to-Peer Architecture

  • No always-on server
  • Arbitrary end systems directly communicate
  • Peers request service from other peers, provide service in return to other peers
  • Self scalability - new peers bring new service capacity, as well as new service demands
  • Peers intermittently connected and change IP addresses

What is a process?

Program running within a host

Within the same host, processes communicate using ______________

inter-process communication

Processes in different hosts communicate by exchanging ________

messages

Client Process

Process that initiates communication

Server Process

Process that waits to be contacted

Sockets

  • Process sends/receives messages to/from its socket
  • Socket analogous to door
  • Sending process shoves message out door
  • Sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process

To receive messages process must have ___________

identifier

Does the IP address of a host on which process runs suffice for identifying the process?

No. many processes can be running on same host.

Identifier includes

both the IP address and port numbers associated with process on host

App-layer protocol defines

  • Types of messages exchanged (request, response)
  • Message syntax (what fields in messages)
  • Message semantics (meaning of info in fields)
  • Rules for when and how processes send & response to messages

Open protocols

  • Defined in RFCS
  • Allows for interoperability
  • e.g., HTTP, SMTP

Proprietary protocols

e.g., Skype

What transport service does an app need?

  • Data integrity
  • Timing
  • Throughput
  • Security

TCP Service

Reliable transport between sending and receiving process


Flow control: sender won't overwhelm receiver


Congestion control: throttle sender when network overloaded


Does not provide: timing, minimum throughput guarantee, security


Connection-oriented: setup required between client and server processes

UDP Service

  • Unreliable data transfer between sending and receiving process
  • Does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, or connection setup

When to use UDP?

When you want live communications and don't care if there are some glitches. (e.g. Streaming videos, Skype)

SSL

  • provides encrypted TCP connection
  • Data integrity
  • end-point authentication

HTTP is stateless

Server maintains no information about past client requests

HTTP uses TCP

  • client initiates TCP connections to server, port 80
  • server accepts TCP connection from client
  • HTTP messages exchanged between browser and webserver
  • TCP connection closed

Non-persistent HTTP

  • at most one object sent over TCP connection
  • connection then closed
  • downloading multiple objects required multiple connections

Persistent HTTP

Multiple objects can be sent over a single TCP connection between client, server

RTT (Round Trip Time)

Time for a small packet to travel from client to server and back

HTTP Response Time in Non-persistent HTTP

  • One RTT to initiate TCP connection
  • One RTT for HTTP request and first few bytes of HTTP response to return
  • file transmission time
  • non-persistent HTTP response time = 2RTT + file transmission time

Two types of HTTP messages

  • request
  • response

True or False:


Non-persistent and stateless mean the same thing

False

True or False:


HTTP is in-band protocol

True

True or False:


Web cache is used heavily in SMPT protocol

False

True or False:


UDP is used heavily as the supporting transport protocol for music downloads

False

True or False:


FTP uses one TCP link in its operation

False

HTTP POST method

Input is uploaded to server in entity body

HTTP URL method

  • Uses GET method
  • Input is uploaded in URL field of request line

HTTP HEAD method

Asks server to leave requested object out of response

HTTP PUT method

uploads file in entity body to path specified in URL field

HTTP DELETE method

Deletes file specified in the URL field

Status code appears in _____ line in server-to-client response message

First

Four components of cookies

  1. Cookie header line of HTTP response message
  2. Cookie header line in next HTTP request message
  3. Cookie file kept on user's host, manage by user's browser
  4. Back-end database at web site

Describe how cookies are used in HTTP

  • HTTP Cookies are small piece of data sent from a website and stored in a user's web browser while the user is browsing that website.
  • Every time the user loads the website, the browser sends the cookie back to the server to notify the website of the user's previous activity.
  • Cookies were designed to be a reliable mechanism for websites to remember stateful information.

What cookies can be used for

  • Authorization
  • Shopping carts
  • Recommendation
  • User session state

How to keep "state" in a protocol

  • protocol endpoints: maintain state at sender/receiver over multiple transaction
  • cookies: HTTP messages carry state

Goal of Web caches

Satisfy client request without involving origin server

Why Web Caching?

  • reduce response time for client request
  • reduce traffic on an institution's access link
  • internet dense with caches

What is a web cache?

A mechanism for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag.

Goal of Conditional GET

Don't send object if cache has up-to-date cached version

FTP

  • Transfer file to/from remote host
  • client/server model
  • client: side that initiates transfer
  • server: remote host
  • uses TCP

3 Major Components of Electronic Mail

  1. User Agents
  2. Mail servers
  3. Simple Mail Transfer Protocol (SMTP)

User Agent in Electronic Mail

  • "mail reader"
  • composing, editing, reading mail messages
  • e.g., Outlook, thunderbird, iPhone mail client
  • outgoing, incoming messages stored on server

Mail servers in Electronic Mail

  • mailbox contains incoming messages for user
  • message queue of outgoing mail messages
  • SMTP between mail servers to send email messages:

SMTP

  • protocol for exchanging email messages
  • uses TCP
  • direct transfer: sending server to receiving server
  • 3 phases of transfer
  • command/response interaction

3 phases of transfer for SMTP

  1. Handshaking
  2. Transfer of messages
  3. Closure

True or False:


SMTP uses persistent connections

True

HTTP vs SMTP

  • HTTP: pull
  • SMTP: push
  • both have ASCII command/response interaction, status codes
  • HTTP: each object encapsulated in its own response message
  • SMTP: multiple objects sent in multipart message

POP3 Protocol

  • Authorization Phase:
  • Client commands: user, pass
  • Server Responses: +OK, -ERR
  • Transaction Phase, client
  • list: list msg #'s
  • retr: retrieve msg by #
  • dele: delete
  • quit

POP3 "download-and-keep":

copies of messages on different clients

True or False:


POP3 is stateless across sessions

True

IMAP

  • keeps all messages in one place: at server
  • allows user to organize messages in folders
  • keeps user state across sessions

DNS (Domain Name System)

  • Distributed database implemented in hierarchy of name servers
  • Application-layer protocol: hosts, name servers communicate to resolve names

DNS Services

  • hostname to IP address translation
  • host aliasing
  • mail server aliasing
  • load distribution

Why not centralize DNS?

  • Single point of failure
  • Traffic volume
  • Distant centralized database
  • Maintenance
  • DOESN'T SCALE!

DNS: root name servers

  • contacted by local name server that can not resolve name
  • root name server:
  • contacts authoritative name server if name mapping not known
  • gets mapping
  • returns mapping to local name server

Top-level domain (TLD) servers

  • responsible for com, org, net, edu, aero, jobs, museums, and all top level country domains, e.g.: uk, fr, ca, jp, kr
  • Network solutions maintains servers for .com TLD

Authoritative DNS servers

  • organization's own DNS server(s), providing authoritative hostname to IP mappings for organization's named hosts
  • can be maintained by organization or service provider

Local DNS name server

  • does not strictly belong to hierarchy
  • each ISP has one
  • when host makes DNS query, query is sent to its local DNS server

Two types of DNS queries

iterative query


recursive query

Once name servers learns mapping, it _________ mapping

caches

DNS records


type=A

  • name is hostname
  • value is IP address

DNS records


type=NS

  • name is domain
  • value is hostname of authoritative name server for this domain

DNS records


type=CNAME

  • name is alias name for some real name
  • (www.ibm.com is really servereast.backup2.ibm.com)
  • value is canonical name

DNS records


type=MX

  • value is name of mailserver associated with name

True or False:


DNS query and reply messages both have the same format

True

DNS: distributed database storing ________ ________

resource records (RR)

File Distribution time: Client-server


Server transmission:

  • Must sequentially send (upload) N file copies
  • time to send 1 copy: F/ U_s
  • time to send N copies NF / U_s

File Distribution time: Client-server


Client:

  • each client must download file copy
  • d_min = min client download rate
  • min client download time: F/d_min

File Distribution time: P2P


Server transmission:

  • must upload at least 1 copy
  • time to send 1 copy: F/u_s

File Distribution time: P2P


client:

  • each client must download file copy
  • min client download time: F/d_min

File Distribution time: P2P


clients:

  • as aggregate must download NF bits
  • max upload rate is u_s + sigma(u_i)

Distributed Hash Table

  • A distributed P2P database
  • Database has (key, value) pairs
  • Distribute the (key, value) pairs over the peers
  • A peer queries DHT with key
  • Peers can also insert (key, value) pairs