Internet infrastructures would be needless if there aren’t any useful applications.
The core of network application development is writing programs that run on different end systems and communicate with each other over the network.
When a program is running on an end system and wants to communicate with other program, from an OS point of view, it’s the process that wants to communicate. For processes running on the same end system, they can communicate with each other with interprocess communication(memory sharing, message passing).
For processes on different host, they communicate with each other by exchanging messages across the computer network. A sending process creates and sends messages into the network; a receiving processes receives these messages and possibly respond by sending messages back.
For a pair of communicating process, the process that initiates the communication is labeled as client, and the process that waits to be contacted to begin the session is the server
To send or receive a message, the process needs to go through the network interface called socket. It is the interface between the application layer and the transport layer within a host, and it’s also referred as the Application Programming Interface(API) between the application and the network.
Another thing needed to send a message is the address of the destination host. More specifically: we need 1) the address of the host and 2) an identifier that specifies the receiving process in the destination host. In internet, the host is identified by its IP address, and the receiving process can be identified by port number.
Packets can get lost within a computer network, so to avoid this, something has to be done to guarantee that the data sent by one end of the application is delivered correctly and completely to the other end of the application. Protocols provide such guarantees are said to provide Reliable Data Transfer.
Transport protocol can also provide throughput guarantees to make sure that the available throughput is at least r bits/s. Applications that have throughput requirements are said to be bandwidth-sensitive applications as opposed to elastic application(no requirements for throughput)
Timing and securities guarantees can also be provided by protocols to serve applications with different purposes.
The internet makes two transport services available to applications, TCP and UDP.
The TCP services model includes a connection-oriented service and a reliable data transfer service. When an application invokes TCP as its transport protocol, the application receives both of those services from TCP: