COMP211 Chapter 2 Flashcards
What are the possible structures for applications?
Client-server or peer-to-peer
Describe client-server architecture
Server = always-on host w/ permanent IP address (consider data centers for scaling) Client = communicate with server, may be intermittently connected, may have dynamic IP addresses, do not communicate directly with each other
Describe P2P (peer-to-peer) architecture
No always-on server, arbitrary end systems communicate directly. Peers request service from other peers, provide service in return to other peers (self-scalability - new peers bring new capacity, as well as new service demands). Peers are intermittently connected and change IP addresses.
What is a process?
A program running within a host
How can processes communicate?
In the same host, through inter-process communication (defined by OS). In different hosts, by exchanging messages across the network.
What are client/server processes?
Client processes initiate communication
Server processes wait to be contacted
How are processes addressed?
Processes have identifiers, including both the IP address and port number associated with the process and host.
What does the application-layer protocol define?
- types of messages exchanged (e.g. request/response)
- message syntax (e.g. what fields in message & how fields deliniated)
- message semantics (meaning of information in fields)
- rules (for when and how processes send & respond to messages)
- open protocols (defined in RFCs, allows for interoperability)
- proprietary protocols (e.g. Skype)
What transport service does an app need?
Data integrity, minimum throughput, timing, security
What services does TCP provide?
- reliable transport between sending & 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)
What services does UDP provide?
- unreliable data transfer between sending and receiving process
- does not provide reliability, flow control, timing, throughput guarantee, secutiry, connection setup
- really fckin fast
What security measures do TCP and UDP take?
None. No encryption, cleartext passwords sent into socket to traverse Internet unencrypted.
What is HTTP?
Hypertext Transfer Protocol, the WWW’s application layer protocol, working on a client-server model where the client is a browser and the server is a web server. HTTP uses TCP and maintains no information about past client requests (it’s “stateless”)
How does non-persistent HTTP differ from persistent HTTP?
Non-Persistent: At most one object sent over TCP connection, connection then closed. Downloading multiple objects requires multiple connections.
Persistent: Multiple objects can be sent over a single TCP connection between a client and server.
What is RTT (Round-Trip Time)?
Time taken for a small packet to travel from client to server and back
How long is a non-persistent HTTP transaction?
2RTT + file transfer time per object