A local connection is a connection between a client and the database server on the same computer. The following sections describe these types of local connections.
A shared-memory connection uses an area of shared-memory as the channel through which the client and database server communicate with each other. Figure 10 illustrates a shared-memory connection.
Shared memory provides fast access to a database server, but it poses some security risks. Errant or malicious applications could destroy or view message buffers of their own or of other local users. Shared-memory communication is also vulnerable to programming errors if the client application performs explicit memory addressing or overindexes data arrays. Such errors do not affect the database server if you use network communication or stream pipes. For an example of a shared-memory connection, refer to Using a Shared-Memory Connection.
A client cannot have more than one shared-memory connection to a database server.
For information about the portion of shared memory that the database server uses for client/server communications, refer to Communications Portion of Shared Memory. For additional information, you can also refer to How a Client Attaches to the Communications Portion.
A stream pipe is a UNIX interprocess communication (IPC) facility that allows processes on the same computer to communicate with each other. You can use stream-pipe connections any time that the client and the database server are on the same computer. For more information, refer to Network Protocol and Shared-Memory and Stream-Pipe Communication.
Stream-pipe connections, unlike shared-memory connections, do not pose the security risk of being overwritten or read by other programs that explicitly access the same portion of shared memory.
Stream-pipe connections have the following disadvantages:
A network connection between a client application and a database server on the same computer is called a local-loopback connection. The networking facilities used are the same as if the client application and the database server were on different computers. You can make a local-loopback connection provided your computer is equipped to process network transactions. Local-loopback connections are not as fast as shared-memory connections, but they do not pose the security risks of shared memory.
In a local-loopback connection, data appears to pass from the client application, out to the network, and then back in again to the database server. In fact, although the database server uses the network programming interface (TLI or sockets), the internal connection processes send the information directly between the client and the database server and do not put the information out on the network.
For an example of a local-loopback connection, see Using a Local-Loopback Connection.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]