Using .NET with Caché eXTreme
Introduction
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Caché eXTreme is a set of technologies that enable Caché to be leveraged as a high performance persistence storage engine optimized for XTP (Extreme Transaction Processing) applications.

Unlike the standard .NET binding, the eXTreme APIs do not use TCP/IP to communicate with Caché. Instead, they use a fast in-memory connection (implemented via standard .NET and the Caché Callin API), and run in the same process as the Caché instance. Although the Caché server and the .NET application must be on the same machine, the application can still use Caché ECP to access data on remote machines.
Caché eXTreme components include:
Installation and Configuration
This section provides specifies requirements and provides instructions for installing Caché and configuring your environment to use the eXTreme APIs.
Requirements
Installation
Required Environment Variables
In order to run eXTreme applications, the following environment variable must be properly set:
Required Files
Your .NET project must include references to the following files:
eXTreme Sample Applications
Sample applications are available for all eXTreme APIs.
XEP Samples
XEP sample files are in <install-dir>/dev/dotnet/samples/xep/ (see Default Caché Installation Directory for the location of <install-dir> on your system). To run them, compile the XEPTest40.csproj project, which includes the following components (located in subdirectory /xep/test/):
See the help file (<install-dir>/dev/dotnet/help/CacheExtreme.chm) for detailed documentation of these programs. Supporting files located in <install-dir>/dev/dotnet/samples/xep/samples/ provide test data for the sample programs. The xep.samples.SingleStringSample class is used by several examples in this book.
Globals API Samples
The Globals API sample applications are compiled into required file InterSystems.CacheExtreme.dll (see Required Environment Variables and References) in namespaces Globals.Test and Globals.Samples.
Sample Data Classes
The examples in this book frequently use the CosTutorial.Person and Sample.Person extents in the Caché Samples namespace to demonstrate data storage and retrieval.
Note:
The contents of these extents can be viewed in the Management Portal by going to [System Explorer] > [Globals], selecting Namespace and Samples from the choices in the left column, and clicking the view link for the desired extent (the CosTutorial.Person extent is listed under PersonD, not CosTutorial.PersonD).
CosTutorial.Person
This very simple Caché class contains the following declarations:
The following commands can be copied and pasted into the Caché Terminal to populate the extent or delete all objects in the extent:
//Switch to the Samples namespace: 
zn "Samples"
// Delete all instances of CosTutorial.Person from the extent:
Do ##class(CosTutorial.Person).%KillExtent()
// Create seven new instances of CosTutorial.Person:
Do ##class(CosTutorial.Person).Populate(7)
For complete structural details, see the CosTutorial.Person entry in the Class Reference. For a Caché ObjectScript example, see the Caché ObjectScript Tutorial (starting with Caché Objects and SQL).
Sample.Person
Some examples in this book use the Sample.Person extent as a data source. The following commands can be copied and pasted into the Caché Terminal to populate the extent or delete all objects in the extent:
//Switch to the Samples namespace: 
zn "Samples"
// Delete all instances of Sample.Person from the extent:
Do ##class(Sample.Person).%KillExtent()
// Create seven new instances of Sample.Person:
Do ##class(Sample.Person).Populate(7)
For structural details, see the Sample.Person entry in the Class Reference.