Network Applications: Architectures, Processes, Sockets, and Transport Requirements
Network Applications
A network application consists of programs running on different end systems and communicating over a network. A web application, for example, has a browser program on the user's host and a server program on a web-server host.
Two common architectures are client-server and peer-to-peer (P2P). In client-server applications, an always-running server handles client requests at an address clients can reach. Examples include the Web, FTP, Telnet, and email. One server can become overloaded, so large services operate multiple data centers with many servers that require continuous power and maintenance: search engines such as Google, Bing, and Baidu; retailers such as Amazon, eBay, and Alibaba; email services such as Gmail and Yahoo!; and social platforms such as Facebook, Instagram, Twitter, and WeChat. In P2P applications, peers need not send all data through a dedicated server. Bandwidth-intensive examples include peer-assisted downloads and BitTorrent file sharing.
Repair distribution when the central server is offline
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
Communicating Processes
Processes on one end system can use interprocess communication. Processes on different hosts, possibly running different operating systems, exchange messages over the network. A process sends and receives through a socket interface.
Sending host
Receiving host
The application uses a socket; the lower layers carry bytes between hosts.
Delivery to a remote process requires an IP address and a port number. The IP address identifies the host; the port identifies the receiving application's endpoint on that host. Because multiple applications can run on one host, a host address is not enough. Familiar assignments include port 80 for an HTTP web server and port 25 for SMTP mail transfer.
Deliver messages to the right process
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
An application chooses a transport protocol when using a socket. Consider four service requirements:
-
Reliable data transfer: Overflow, corruption, or other problems can cause loss. Email, file transfer, and financial applications require complete data. Some audio and video applications tolerate limited loss as a small disturbance rather than a fatal failure.
-
Throughput: Some applications need a particular delivery rate; others can adapt to the available rate.
-
Timing: Internet calls and multiplayer games are sensitive to delay. Long pauses make conversation unnatural or interaction unresponsive.
-
Security: Encryption at the sender and decryption at the receiver can protect content against interception.
| Application | Data loss | Throughput requirement | Timing sensitivity |
|---|---|---|---|
| File transfer | No loss allowed | Elastic | No |
| No loss allowed | Elastic | No | |
| Internet calls | Some loss tolerated | A few kbps to 1 Mbps | 100 ms |
| Video conferences | Some loss tolerated | 10 kbps to 5 Mbps | 100 ms |
| Interactive games | Some loss tolerated | A few kbps to 10 kbps | 100 ms |
TCP / UDP
TCP (Transmission Control Protocol) provides:
-
Connection-oriented service: Before application data, the endpoints exchange transport control information to establish a connection between their sockets. The connection is closed when communication ends.
-
Reliable data transfer: Data accepted for delivery is presented in order, without duplicates; failures can still terminate a connection rather than guaranteeing eventual delivery under every circumstance.
-
Congestion control.
UDP (User Datagram Protocol) provides:
-
Connectionless communication.
-
Unreliable data transfer: A datagram may fail to arrive or may arrive out of order.
-
No built-in congestion control.
| Application | Typical transport in the examples |
|---|---|
| File transfer | TCP |
| TCP | |
| Internet calls | UDP |
| Video conferences | UDP |
| Interactive games | UDP |
KNOWLEDGE QUIZ
Address two services on one host
Host 198.51.100.20 runs HTTP on TCP port 80 and SMTP on TCP port 25, with nothing listening on 8000. Write the destination endpoint for fetching a page and transferring mail. Explain what is wrong with using port 8000, and whether TCP alone guarantees delivery within 100 ms or protects plaintext from observation. Use only this supplied service map.