Computer networks 2. Application Layer

Source: Internet
Author: User

Application Architecture Application Architecture. General network applications, there are two kinds of structure, the client/server architecture and peers (peer to peer).

Customer/server Architecture client-server architecture. Called server, which serves requests from the client. There is no direct communication between the clients. The server has a fixed, well-known address, called an IP address, and is always in the open state. A server host often fails to keep up with all of its client requests. Often use host cluster a cluster of hosts or called Server farm server farm to create a powerful virtual server. Application services based on the client server architecture are typically infrastructure-intensive infrastrucuture intensive. Because you want to purchase, install and maintain the server farm.

There is minimal or no dependency on the infrastructure server that is always open in the peer-to architecture. Free-time connected hosts are referred to as peer peers and communicate directly.

The most prominent feature in peer-to-peer is its self-extensibility self-scalability.


The actual communication is process. Rather than the program.

The processes of different end systems communicate with each other by exchanging messages across computer networks.

Divided into client processes and server processes.

In a communication session between a given pair of processes, the process initiating the communication is the client process, while the process waiting to be contacted is the server process.

The process sends and receives messages on the network through a software interface called Socket sockets. A socket is an application programming interface API between an application and a network.

Ability to classify application services based on reliable transmission of data, throughput, timing and security.

Reliable transmission of data reliable data transfer, transport layer for reliable transmission of data, when the transport layer to use such services, it can be believed that the data error-free arrival to the receiving process. When a transport layer protocol does not provide reliable transmission of data. For applications that tolerate loss loss-tolerant application, such as multimedia applications, a certain degree of data loss is acceptable.

Throughput throughput: Programs with throughput requirements are called bandwidth-sensitive applications bandwidth-sensitive application. Most multimedia applications are bandwidth-sensitive.

The elastic application elastic appliction can be used to make full use of the available throughput.

Timing timing: The Transport Layer protocol also provides timing assurance, just as the throughput is guaranteed. Different applications have different time limits.

Safety Security: Transport Layer protocol can provide one or more security services for your application.


The Internet, or an application that can be said to be a TCP/IP network, uses two transport layer protocols: UDP and TCP.

TCP services: Includes connection-oriented services and reliable transport of data services. When the application layer program calls the TCP protocol as its transport layer protocol. The application gets both of these services.

Connection-oriented Services connection-oriented service: Exchange Transport-layer control information between the client program and the server program before the message starts flowing. That is, the handshake process handshaking. The handshake process prompts the client and server to prepare for the transport grouping. After shaking hands. A TCP connection TCP connection was established between the sockets sockets of two processes.

Reliable transmission of data services reliable the transfer service: The process of communicating, error-free. Deliver the data sent sequentially.

The UDP service is not connected. There is no handshake process. UDP does not guarantee that messages can be properly received. And there is no congestion control mechanism.


Process addressing addressing processes: requires the name or address of the host and flags that are used to specify the receiving process on the destination host. The host is identified by an IP address. The process is specified by port number of the destination port.

There may be multiple processes using the same port on a host at the same time. If multiple browsers are using 80port to browse the Web. But the operating system prescribes a time when only one process can use port and listen to port, that is, when you get the focus of a process. That is, it is using port, and other processes cannot use port.


The application layer protocol defines:

Types of messages exchanged, such as request messages and response messages.

The syntax syntax for various messages, such as each field in a message and its descriptive description.

The semantics of the field. That is, the meaning of the information included in the field.

The process when and how the message is sent, and the rules for responding to the message.

The Application layer protocol is part of the network application.


Web applications and HTTP protocols:

The Web Application layer protocol hypertext Transfer Protocol HTTP for Hypertext Transfer Protocol.

HTTP is implemented by a two-part program, a client program. A server program.

Web page Web pages are composed of objects, objects are files, HTML files, picture files. Video files and more. The file is addressed through a URL address.

The web typically includes a primary HTML file and several reference objects.

HTTP uses TCP as the Transport layer protocol. HTTP does not save whatever information about the client. is a stateless protocol stateless protocol.

Non-persistent Connection non-persistent connection: Each request/response is sent via a separate TCP connection.

Persistent Connection Persistent Connection: All requests are sent via the same TCP connection. HTTP uses persistent connections by default.

For non-persistent connections, when a Web page has multiple references, each time a reference file is loaded, a new connection is created to transfer the data. Round trip time round-trip time RTT, which is a grouping of times from the client to the server and back to the client. Each TCP connection has a three-time handshake process.


HTTP message:

Request message Response message: The first line of the request message is called the request line require lines. Its successor line is called the header line. The remainder of the behavior entity body bodies entity.

Request line has three Fields field: Method field. The URL field and the HTTP version number. The value of the Method field is Get,post,head,put,delete.


Socket programming.

Cond.


Copyright notice: This article Bo Master original article. Blog, not reproduced without consent.

Computer networks 2. Application Layer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.