Computer Networks Chapter 2 Flashcards
API
Application programming interface. A set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service.
Process
Program running within a host (end system).
Communication Within the Same Host
Within the same host, two processes communicate using inter-process communication, defined by the OS.
Communication Between Different Hosts
Processes in different hosts communicate by exchanging messages.
Client Process
Process that initiates communication.
Server Process
Process that waits to be contacted.
Open Protocols
Defined in RFCs. Everyone has access to protocol definition. Allows for interoperability.
ex. HTTP, SMTP.
Proprietary Protocols
Private protocol definition.
ex. Skype, Zoom.
Client-Server Paradigm
Server:
-always-on host
-permanent IP address
often in data centers, for scaling
Clients:
-contact, communicate with, server
-may be intermittently connected
-may have dynamic IP addresses
-do not communicate directly with each other
ex. HTTP, IMAP, FTP
Peer-Peer (P2P) 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 are intermittently connected and change IP addresses
-complex management compared to client-server paradigm
*Applications with P2P architecture have both client and server processes, depending on the task they are currently carrying out.
Sockets
A socket is analogous to a door:
-process sends/receives messages to/from its socket.
-sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process.
-two sockets involved: one on each side.
Identifiers
To receive messages, a process must have an identifier. An identifier includes both IP address and port number associated with the process on the host.
*Host devices have a unique 32-bit IP address.
*example port numbers include: HTTP server (80) and mail server (25).
An Application-Layer Protocol Defines…
How an application’s processes, running on different end systems, pass messages to each other.
-types of messages exchanged.
-message syntax.
-message semantics.
-rules for when and how processes send and respond to a message.
Transport Services an App Needs
-data integrity
-timing
-throughput
-security
Internet Transport Protocols Services
-TCP
-UDP
TCP Service
“Transmission control protocol” service.
-reliable transport between sending and receiving process.
-flow control: sender won’t overwhelm receiver.
-congestion control: throttle sender when network overloaded.
-connection-oriented: setup required between client and server processes.
-does not provide: timing, minimum throughput guarantee, security.
UDP Service
“User Datagram Protocol” services.
-unreliable data transfer between sending and receiving process.
-does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, or connection setup.
Vanilla TCP and UDP Sockets
-no encryption.
-cleartext passwords sent into socket traverse Internet in cleartext.
HTTP
Hypertext transfer protocol. Web’s application-layer protocol. Based on the client/server model.
Client/Server Model
client: browser that requests, receives (using HTTP protocol), and “displays” Web objects.
server: Web server sends (using HTTP protocol) objects in response to requests.
Non-persistent HTTP
-TCP connection opened.
-At most one object sent over TCP connection.
-TCP connection closed.
*downloading multiple objects requires multiple connections.
Persistent HTTP
-TCP connection opened to a server.
-Multiple objects can be sent over single TCP connection between client and that server.
-TCP connection closed.
RTT
“Round Trip Time.” Time for a small packet to travel from client to server and back.
HTTP Response Time (per object)
-one RTT to initialize TCP connection.
-one RTT for HTTP request and first few bytes of HTTP response to return.
-object/file transmission time.
Non-persistent HTTP Issues
Application Architecture
Designed by the application developer and dictates how the application is structured over the various end systems.
-Client-server Architecture
-P2P Architecture
Handshaking
Client and server exchange transport-layer control information with each other before the application-level messages begin to flow.
Full-Duplex
Two processes can send messages to each other over the connection at the same time.
Pipelining
Requests for objects can be made back-to-back, without wait
ing for replies to pending requests.