NET8协议系统构架(Oracle内部培训文档节选)

来源:互联网 发布:three.js绘制弧线 编辑:程序博客网 时间:2024/05/01 15:43

 The Net8 Stack


Net8 Layers
Oracle clients and servers use stack communications to share, modify, and manipulate
data between themselves.
In an Oracle client-server transaction, information passes through the following layers:
• Application (client)
• Oracle Call Interface (OCI) or Oracle Program Interface (OPI)
• Two Task Common
• Transparent Network Substrate (TNS)
• Oracle protocol adapters (OPA)
• Network-specific protocols
Each layer of the stack is responsible for one or more specific tasks.

Application Layer
Oracle client applications provide all user-oriented activities, such as character or
graphical user interface (GUI) display, screen control, data presentation, application
flow, and other application specifics.
An example of a client application could be Oracle Forms or SQL*Plus.
The application identifies database operations to send to the server and passes them
through to the Oracle Call Interface (OCI).

Oracle Call Interface Layer
The OCI code contains all the information required to initiate a SQL dialogue between
the client and the server. It defines calls to the server to:
• Describe the contents of the fields being returned based on the values in the
server’s data dictionary
• Parse SQL statements for syntax validation
• Open a cursor for the SQL statement
• Bind client application variables into the server shared memory
• Execute SQL statements within the cursor memory space
• Fetch one or more rows of data into the client application
• Close the cursor
The OCI is also referred to as the OPI, or Oracle Program Interface, on the server. The
client application uses a combination of these calls to request activity within the
server. OCI calls can be combined into a single message to the server, or they can be
processed one at a time through multiple messages to the server, depending on the
nature of the client application. Oracle products attempt to minimize the number of
messages sent to the server by combining many OCI calls into a single message to the
server. When a call is sent, control is passed to Net8 to establish the connection and
transmit the request to the server.


Technical Note
The OCI is fully documented, so anyone who wants to write applications using OCI
can do so.

Two Task Common Layer
The Two Task Common layer provides character set and data type conversion between
different character sets or formats on the client and server. This layer is optimized to
perform conversion only when required on a per-connection basis.
During the initial connection, the Two Task Common layer is responsible for
evaluating differences in internal data and character set representations and
determining whether conversions are required for the two computers to communicate.
Conversion is required in situations in which the client-side character set differs from
that of the server side.
One example of this situation is a client running the WE8ISO8859P1 character set
while the server is running the US7ASCII character set. In this case, the Two Task
Common layer acts as a translator, helping to convert the values of one character set to
the other.

Transparent Network Substrate Layer
The Transparent Network Substrate (TNS) layer is an underlying layer of Net8
providing a common interface to industry-standard protocols. TNS receives requests
from Two Task Common and settles all generic machine-level connectivity issues,
such as the location of the server or destination (open, close functions), whether one or
more protocols are involved in the connection (open, close functions), and how to
handle interrupts between client and server based on the capabilities of each (send,
receive functions). The generic set of TNS functions (open, close, send, receive)
passes control to an Oracle Protocol Adapter to make a protocol-specific call.
Additionally, TNS supports encryption and sequenced cryptographic message digests
to protect data in transit.
The TNS layer itself consists of more Net8-specific layers, each handling its specific
functions of the TNS. These are not covered in further detail.

Oracle Protocol Adapter Layer
Oracle protocol adapters (OPA) are responsible for mapping TNS functions to
industry-standard protocols used in the client-server connection. Each adapter is
responsible for mapping the equivalent functions between TNS and a specific
protocol.


Network Protocols
The Net8 architecture provides support for a broad range of networking protocols,
including TCP/IP, Novell SPX/IPX, IBM LU6.2, DECnet, and OSI. By using Net8
protocol adapters, companies can maintain their existing infrastructure without
expensive changes. Additionally, Net8 supports multiple protocols on a single
machine simply through installation of multiple protocol adapters.

Network-Specific Protocol
All Oracle software in the client-server connection process requires an existing
network protocol stack to make the machine-level connection between the two
machines. The network protocol is responsible only for transmitting the data from the
client machine to the server machine, at which point the data is passed to the
server-side protocol adapter.

原创粉丝点击