我對ISO 七層模型的理解


應用層:

負責native格式的請求配置,請求發起、關閉等功能;

負責應用數據請求可直接調用的api的支持。

使用表示層和會話層包裝而成的便捷工具(API):Alamofire

 

表示層:

將應用層配置的數據格式化為協議支持的數據格式(數據包);

根據應用要求和協議規定進行請求和相應數據的格式化和反格式化;

Techopedia explains Presentation Layer

The presentation layer is responsible for the following:

  • Data encryption/decryption 
  • Character/string conversion
  • Data compression 
  • Graphic handling

The presentation layer mainly translates data between the application layer and the network format. Data can be communicated in different formats via different sources. Thus, the presentation layer is responsible for integrating all formats into a standard format for efficient and effective communication.

OSI模型的表示層,為應用層提供數據,並負責數據裝換和代碼的格式化。從本質上來說,這一層是翻譯器,並提供編碼和轉換功能。

 

會話層:

承接應用層的請求發起、關閉指令,進行會話處理和控制;包含會話數據的安全;

包含 http的會話管理策略、鑒權策略、ssl加密策略、證書驗證策略、緩存策略等等等;

根據協議規定進行會話控制;

 

會話層是整個應用通信的核心;應用層所做的工作就是和表示層、會話層一起協作,配置會話需要的數據,從而完成會話。

 

編程的過程實在最上面的三個層次進行的;

之所以要分為三個層次,是為了方便邏輯上的組織;沒有其它更多用途。

 

The Presentation Layer (Layer 6)

This layer is sometimes called the syntax layer. It isn’t often referred to, but in general the Presentation Layer is responsible for converting application data to a syntax that is ready for network transport using lower layer protocols.

 

https://www.wordfence.com/learn/networking-for-wordpress-administrators/

 

https://www.networxsecurity.org/members-area/glossary/o/osi-model.html

https://www.networxsecurity.org/members-area/glossary/o/osi-model.html

 

 

 

Application (think web browser, email client)

Application layer usually is the easiest to understand, so we should start our discussion here. This layer can be the program running on your computer (or on a server) that connects you to Google.com, eBay, or this blog. The client application will exchange data with the server application (and vice versa) without understanding Ethernet, TCP/IP, or other networking techniques (in general). This application data requires some processing locally before sending it to the server, care of the next several layers. I've provided examples next to the layer name, to help connect the layer to a common implementation.

 

Presentation (think encryption, compression)

Presentation layer provides formatting for data to be transferred between systems, so the end-system can readily receive and interpret the application data correctly. This step was vital when differing standards of data format were a problem (think 7-bit ASCII vs 8-bit EBCDIC). The most common examples now would be any encryption/decryption required for transmitting application data (not VPN-based, but application-based encryption) or the use of compression within applications transmitting data between systems.

 

Session (think Remote Procedure Calls)

Session layer provides a way for applications to "synchronize" their client-server communication and translate between "transport addresses" of Layer 4 and the "session addresses" that represent the application. If a system were running Firefox and Internet Explorer simultaneously, the session layer keeps Layer 4 connections associated with the right browser (or the pages displayed would be unusable in most cases). A good example of this layer are the remote procedure calls (RPC) associated with many client-server applications like Microsoft Exchange and Network File System (NFS).

 

https://primacore.net/articles/osi-model-overview.html

 

會話層:

在ssh、fastcgi以及http2等協議中,確實是有session的概念的。一個tcp鏈接里multiplex了多個session,每個session都可以單獨close,創建session基本沒有開銷,session就相當於輕量級鏈接。

 

The session layer provides the mechanism for opening, closing and managing a session between end-user application processes, Communication sessions consist of requests and responses that occur between applications. 

Session-layer services are commonly used in application environments that make use of remote procedure calls (RPCs).

 

Session layer establishes, controls and ends the sessions between local and remote applications.(tracks the dialogs between multiple computers)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM