Collection Contents Index CHAPTER 26.  Client/Server Communications Real world protocol stacks pdf/chap26.pdf

User's Guide
   PART 4. Database Administration and Advanced Use
     CHAPTER 26. Client/Server Communications       

Network communication concepts


Applications in a local area network communicate using a set of rules and conventions called an application protocol. Each application is isolated from the lower-level details of how information gets transported across the network by lower-level protocols, which form a protocol stack.

This section provides a brief description of how protocol stacks work. Hints regarding specific network issues later in this chapter assume a basic understanding of how protocol stacks operate.

Top of page  The protocol stack

The figure shows the layers of a protocol stack, based on a simplification of the OSI Reference Model of network communications.

The OSI (Open Systems Interconnection) Reference Model, developed by the International Organization for Standardization (ISO), is a step towards international standardization of network protocols. Most current networking software and hardware conforms to some extent, but not exactly, to this model. Even though conformance is incomplete, the OSI model is a valuable aid in understanding how network communications work.

Top of page  How information is passed across a network

When one network application sends information to another network application (such as the database server), the information passes down one protocol stack, across the network, and up the other protocol stack to the other application.

Protocol stacks have layers 

The protocol stack isolates the different functions needed for reliable data transfer. Each layer of the protocol stack is connected to the layers above and below it by an interface.

Each layer of a protocol stack treats information passed to it by the layer above it merely as data, labeling that data in such a way as to be identified and deciphered by the equivalent layer on the other computer. Only the physical layer is responsible for actually placing data onto the wire—all other layers provide some well-defined level of functionality, such as error detection, correction, encryption and so on.

Each layer has a protocol 

Although actual data transmission is vertical (down one stack, up the other), each layer is programmed as if it were in direct communication with the corresponding layer on the other stack (peer-to-peer communication). The rules and conventions that govern each level of peer-to-peer communication are called a protocol for that level. There exist transport protocols, network protocols, data link protocols, and application level protocols, among others.

Protocol stack compatibility 

The protocol stacks on each side of the communication must be compatible at each level for network communications to work properly. If they are not compatible, the layer on the receiving stack does not understand the information being passed to it by its corresponding layer on the sending stack.

Software that manages lower levels in a protocol stack is often called a driver. The different layers of a protocol stack have the following functions:

Top of page  The physical layer

Your network adapter, or network card, and the network wiring form the physical layer for network communication. The higher layers in the protocol stacks ensure that software does not have to be aware of the details of network wiring or network adapter design.

Top of page  The data link layer

The job of a data link layer is to handle the safe passing of information across the network at the level of individual sets of bits. At higher levels of the protocol stack, data is not described in terms of individual bits. It is at the data link layer that information is broken down to this elementary level.

The data link layer's interface with the network layer above it in the protocol stack commonly conforms to one of two specifications: the Network Driver Interface Specification (NDIS) developed jointly by IBM and Microsoft, and the Open Device Interface (ODI) developed by Novell.

ODI and NDIS data link layers can be made compatible with each other using a translation driver.

For Info     For more information, see Working with multiple protocol stacks.

Top of page  The network layer

The network layer takes a packet of information from the transport layer above it and gets it to the corresponding network layer on the receiving protocol stack. Issues of routing are handled by the network layer.

Information at a higher level is broken down into packets of a specified size (in numbers of bytes) for transmission across a network.

Examples of network layer protocols 

Internet Protocol (IP) and Novell's IPX are widely-used network layer protocols. Adaptive Server Anywhere has interfaces to both network layer protocols and transport layer protocols. Adaptive Server Anywhere has an interface directly to the IPX network protocol.

Top of page  The transport layer

The principal task of the transport layer is to guarantee the transmission of information between applications. It accepts information directly from a network application, such as a database server, splits it up if necessary, passes the packets to the network layer and ensures that the pieces all arrive correctly at the other end, where it assembles the packets before passing them up the stack to the application layer.

Examples of transport protocols 

Novell's SPX, Microsoft and IBM's NetBEUI, and Named Pipes are widely-used transport protocols. The TCP/IP suite of protocols includes more than one transport layer. NetBIOS is an interface specification to the transport layer from IBM and Microsoft that is commonly (but not necessarily) paired with the NetBEUI protocol.

Adaptive Server Anywhere supports the NetBIOS interface to the transport layer. In addition, Adaptive Server Anywhere has an interface to Named Pipes for same-machine communications only.

Adaptive Server Anywhere applies its own checks to the data passed between client application and server, to further ensure the integrity of data transfer.

Top of page  The application layer

Database servers and client applications are typical application layers in a protocol stack, from a networking point of view. They communicate using an application-defined protocol. This protocol is internal to Adaptive Server Anywhere programs.

Typical data for transmission includes a SQL query or other statement (from client application to database server) or the results of a SQL query (from database server to client application).

Passing information down the protocol stack 

The client library and database server have an interface at the transport level (in the case of NetBIOS or Named Pipes), or at the network level (in the case of IPX and TCP/IP), passing the information to the network communications software. The lower levels of the protocol stack are then responsible, independent of the application, for transmitting the data to the equivalent layer on the other computer. The receiving layer hands the information to Adaptive Server Anywhere on the receiving machine.

The database server and the client library perform a set of checks and functions to ensure that data passed across the network arrives correctly, in a proper form.

Top of page  Compatible protocol stacks

For two protocol stacks to be compatible, they must be operating the same transport layer (say NetBIOS) on each stack, and the same network protocol on each stack (say IP). If one stack employs a NetBIOS interface to the transport layer, so must the other. A client application running on a protocol stack employing NetBIOS cannot communicate with a database server using a TCP/IP protocol stack.

At the data link layer, ODI-based protocol stacks can be made compatible with NDIS-based protocol stacks using translation drivers, as discussed in Working with multiple protocol stacks.

Top of page  

Collection Contents Index CHAPTER 26.  Client/Server Communications Real world protocol stacks pdf/chap26.pdf