The application architecture is designed by the application developer and dictates how the application is structured over the various end systems.
In a client-server architecture, there is always-on host called the server, which services requests from many other hosts, called clients.
A characteristic of the client-server architecture is that the server has a fixed, well-known address, which is called the IP address.
Some examples of applications with a client-server architecture include: Web, FTP, Telnet, and email.
In a P2P architecture, there is minimal (or no) reliance on dedicated servers in data centers.
An P2P architecture application exploits direct communication between pairs of intermittently connected hosts, called peers.
Peers are not owned by the service provider, but are instead desktops and laptops controlled by users. Because the peers communicate without passing through a dedicated server, the architecture is called peer-to-peer.
One of the most compelling features of P2P architectures is their self-scalability.
P2P applications face challenges of security, performance, and reliability due to their highly decentralized structure.
A process is a program that is running within an end system. On the end system, they can communicate with each other with interprocess communication, using rules that are governed by the end system's operating system.
Processes on two different end systems communicate with each other by exchanging messages across the network.
With the Web, a browser is a client process and a Web server is a server process.
With P2P file sharing, the peer that is downloading the file is labeled as the client, and the peer that is uploading the file is labeled as the server.
A process sends messages into, and receives messages from, the network through a software interface called a socket.
A socket (API) is the interface between the application layer and the transport layer within a host.
For a process running on one host to send packets to a process running on another host, the receiving process needs to have an address.
A loss-tolerant application is an application that can handle some amount of data loss.
Elastic applications can make use of as much, or as little, throughput as happens to be available.
The Internet makes two transport protocols available to applications: UDP and TCP.
Neither TCP or UDP provide any encryption.
TCP has connection-oriented service, reliable data transfer service, and congestion-control mechanism.
UDP is connectionless, so there is no handshaking before the two processes can communicate. It also provides an unreliable data transfer service.
Transport protocol services can be organized into four categories: reliable data transfer, throughput, timing, and security.
An application-layer protocol defines how an application's processes, running on different end systems, pass messages to each other.