Using Caché Direct
Introduction to Caché Direct
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Caché Direct is a client/server connection mechanism that provides, over a TCP connection, direct control over server operation from a Windows COM/OLE or C++ client program. The connection is performed via a very fast, low overhead mechanism. Caché Direct includes built-in, transparent support for Caché security, Citrix/Windows Terminal services, IPv6, and so on.

Note:
As of Caché 2015.1, the client is available in separate versions for 32-bit and 64-bit systems.
As suggested by its name, Caché Direct provides the most direct possible access from a client to a Caché server. That is, Caché ObjectScript commands are sent from the client to the server, executed there, and the results returned to the client. Caché Direct sets up one or more TCP channels between the two parts of the application and manages the messages between them. The full power of Caché objects and embedded SQL are also available through Caché Direct; the client has full access to all the facilities of the server, restricted only by the Caché security settings.
Multiple server jobs/channels may be created and managed simultaneously from a single client process, providing the possibility of client multithreading and connections to multiple servers from a single client at the same time.
Caché Direct also provides facilities for calling back from the server to the client, logging flow of control and communications traffic on both the client and server, and various hooks for message transformations (such as compression), error handling, and shutdown tasks.
Note:
Caché Direct is not intended for use in building Web-based applications. Instead it is meant for direct client/server applications.
Concepts
Caché Direct provides an ActiveX control (VisM.OCX, or VisM64.OCX) that is used most frequently in Visual Basic projects, as well as a C++ interface for C++ clients. The VisM control has properties and methods that you use to specify the connection to Caché and the commands to send.
Internally, the VisM control does not communicate directly with Caché. Instead, it starts and is attached to an object called CDConnect, which in turn connects to Caché, starting a slave server process on the server and managing the communication channel. The CDConnect can be attached to multiple VisM instances, can exist even if detached from all VisM instances, and can be redirected to a different server process. This flexibility means that Caché Direct can support various architectures such as the following:
The Caché Direct client is supported on all Windows platforms that support the Caché client.
The Caché Direct server is supported on all platforms that support the Caché server.
The servers can be on the same or different machines or databases, in any convenient distribution.
Terminology
The Caché Direct communications model uses the following terms:
The following figure shows a possible state of a Caché Direct application. The items in the upper area (above the double line) are all running on the client side, within a single process. The items below the double line run on the Caché server machine or machines.
Communication Model
Formally, the Caché Direct communications model obeys the following rules:
An analogy may be helpful. A CDConnect behaves as a speaker phone with a single telephone line. The listeners in the room are the VisMs; they all hear the same communication. There is one person on the other end of the call; that person is the Caché server. If the call is transferred to another server, all the VisMs are now connected to that new person.
Available Tools and Approaches
On the client side, Caché Direct is a set of layered C++ classes, which in turn are wrapped in the VisM control, which exposes all the necessary properties and methods. When you install the Caché client software, it installs and registers this control so that you can use it in an ActiveX host, such as Visual Basic. As a result, you can use Caché Direct at several different levels:
On the server side, Caché Direct is a transparent part of the Caché server installation. If you need to upgrade the Caché Direct server without installing a later version of Caché itself, there is a simple way to load the latest Caché Direct server code into your Caché installation. See Upgrading Your Caché Direct Server, near the end of this manual.