1/37
Contents
List of Examples
List of Figures
List of Tables
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
Part I Getting Started
1
Introduction
Components Overview
Types Of Clients
Data Clients
Real Time Clients
Client APIs
POF Serialization
Understanding Client Configuration Files
2
Installing a Client Distribution
Installing Coherence for Java
Installing the C++ Client Distribution
Supported Environments
Microsoft-Specific Requirements
Extracting the Coherence for C++ Distribution
Installing the .NET Client Distribution
Prerequisites
Running the Installer
Deploying Coherence for .NET
3
Setting Up Coherence*Extend
Overview
Configuring the Cluster Side
Setting Up Extend Proxy Services
Defining a Proxy Service
Defining Multiple Proxy Services
Disabling Cluster Service Proxies
Specifying Read-Only NamedCache Access
Specifying NamedCache Locking
Defining Caches for Use By Extend Clients
Configuring the Client Side
Defining a Remote Cache
Using a Remote Cache as a Back Cache
Defining Remote Invocation Schemes
Configuring Fault Tolerance for Remote Addresses
Detecting Connection Errors
Using an Address Provider for TCP Addresses
Using Network Filters with Extend Clients
4
Building Your First Extend Client
Overview
Step 1: Configure the Cluster Side
Step 2: Configure the Client Side
Step 3: Create the Sample Client
Step 4: Start the Cache Server Process
Step 5: Run the Application
5
Securing Coherence*Extend
Restricting Client Connections
Using Identity Tokens to Restrict Client Connections
Creating a Custom Identity Transformer
Enabling a Custom Identity Transformer
Creating a Custom Identity Asserter
Enabling a Custom Identity Asserter
Using Custom Security Types
Understanding Custom Identity Token Interoperability
Associating Identities with Extend Services
Implementing Authorization
Creating Authorization Interceptor Classes
Enabling Authorization Interceptor Classes
Using SSL to Secure Client Communication
Configuring a Cluster-Side SSL Socket Provider
Configure a SSL Socket Provider Per Proxy Service
Configure a SSL Socket Provider for All Proxy Services
Configure a Java Client-Side SSL Socket Provider
Configure a SSL Socket Provider Per Remote Service
Configure a SSL Socket Provider for All Remote Services
Configure a .NET Client-Side Stream Provider
Managing Rogue Clients
6
Best Practices for Coherence*Extend
Run Proxy Servers with Local Storage Disabled
Do Not Run a Near Cache on a Proxy Server
Configure Heap NIO Space to be Equal to the Max Heap Size
Set Worker Thread Pool Sizes According to the Needs of the Application
Be Careful When Making InvocationService Calls
Be Careful When Placing Collection Classes in the Cache
Run Multiple Proxies Instead of Increasing Thread Pool Size
Configure POF Serializers for Cache Servers
Use Node Locking Instead of Thread Locking
Part II Creating Java Extend Clients
Part III Creating C++ Extend Clients
7
Setting Up C++ Application Builds
Setting up the Compiler for Coherence-Based Applications
Including Coherence Header Files
Linking the Coherence Library
Setting the Runtime Library and Search Path
Deploying Coherence for C++
8
Configuration and Usage for C++ Clients
General Instructions
Implementing the C++ Application
Compiling and Linking the Application
Configure Paths
Configure Coherence*Extend
Configure Coherence*Extend in the Cluster
Configuring Coherence*Extend on the Client
Defining a Local Cache for C++ Clients
Defining a Near Cache for C++ Clients
Connection Error Detection and Failover
Obtaining a Cache Reference with C++
Cleaning up Resources Associated with a Cache
Configuring and Using the Coherence for C++ Client Library
Setting the Configuration File Location with an Environment Variable
Setting the Configuration File Location Programmatically
Operational Configuration File (tangosol-coherence-override.xml)
Configuring a Logger
Launching a Coherence DefaultCacheServer Proxy
9
Understanding the Coherence for C++ API
CacheFactory
NamedCache
QueryMap
ObservableMap
InvocableMap
Filter
Value Extractors
Entry Processors
Entry Aggregators
10
Using the Coherence C++ Object Model
Using the Object Model
Coherence Namespaces
Understanding the Base Object
Automatically Managed Memory
Referencing Managed Objects
Using handles
Managed Object Instantiation
Managed Strings
String Instantiation
Auto-Boxed Strings
Type Safe Casting
Down Casting
Managed Arrays
Collection Classes
Managed Exceptions
Object Immutability
Integrating Existing Classes into the Object Model
Writing New Managed Classes
Specification-Based Managed Class Definition
Equality, Hashing, Cloning, Immutability, and Serialization
Threading
Weak References
Virtual Constructors
Advanced Handle Types
Thread Safety
Synchronization and Notification
Thread Safe Handles
Escape Analysis
Thread-Local Allocator
Diagnostics and Troubleshooting
Thread Dumps
Memory Leak Detection
Memory Corruption Detection
Application Launcher - Sanka
Command line syntax
Built-in Executables
Sample Custom Executable Class
11
Building Integration Objects for C++ Clients
POF Intrinsics
Serialization Options
Managed<T> (Free-Function Serialization)
PortableObject (Self-Serialization)
PofSerializer (External Serialization)
POF Registration
Need for Java Classes
Performance
12
Perform Continuous Query for C++ Clients
Uses of Continuous Query Caching
The Coherence Continuous Query Cache
Defining a Continuous Query Cache
Cleaning up Resources Associated with a Continuous Query Cache
Caching Only Keys, or Caching Both Keys and Values
CacheValues Property and Event Listeners
Using ReflectionExtractor with Continuous Query Caches
Listening to the Continuous Query Cache
Avoiding Unexpected Results
Achieving a Stable Materialized View
Support for Synchronous and Asynchronous Listeners
Making the Continuous Query Cache Read-Only
13
Query the Cache for C++ Clients
Query Functionality
Simple Queries
Querying Partitioned Caches
Querying Near Caches
Query Concepts
Queries Involving Multi-Value Attributes
ChainedExtractor
14
Remote Invocation Service for C++ Clients
Configuring and Using the Remote Invocation Service
Registering Invocable Implementation Classes
15
Deliver Events for Changes as they Occur (C++)
Listener Interface and Event Object
Caches and Classes that Support Events
Signing Up for all Events
MultiplexingMapListener
Configuring a MapListener for a Cache
Signing Up for Events on Specific Identities
Filtering Events
"Lite" Events
Advanced: Listening to Queries
Advanced: Synthetic Events
Advanced: Backing Map Events
Advanced: Synchronous Event Listeners
Summary
16
Performing Transactions for C++ Clients
Using the Transaction API within an Entry Processor
Creating a Stub Class for a Transactional Entry Processor
Registering a Transactional Entry Processor User Type
Configuring the Cluster-Side Transactional Caches
Configuring the Client-Side Remote Cache
Using a Transactional Entry Processor from a C++ Client
17
Sample Applications for C++ Clients
Prerequisites for Building and Running the Sample Applications
Starting a Coherence Proxy Service and Cache Server
Building the Sample Applications
Starting a Sample Application
Running the hellogrid Example
Running the console Example
Running the contacts Example
Part IV Creating .NET Extend Clients
18
Configuration and Usage for .NET Clients
General Instructions
Configuring Coherence*Extend
Configuring Coherence*Extend in the Cluster
Configuring Coherence*Extend on the Client
Defining a Local Cache for .NET Clients
Defining a Near Cache for .NET Clients
Connection Error Detection and Failover
Starting a Coherence DefaultCacheServer Process
Obtaining a Cache Reference with .NET
Cleaning Up Resources Associated with a Cache
19
Using the Coherence .NET Client Library
Setting Up the Coherence .NET Client Library
Using the Coherence .NET APIs
CacheFactory
IConfigurableCacheFactory
DefaultConfigurableCacheFactory
Logger
Using the Common.Logging Library
INamedCache
IQueryCache
IObservableCache
Responding to Cache Events
IInvocableCache
Filters
Value Extractors
Entry Processors
Entry Aggregators
20
Building Integration Objects for .NET Clients
Configuring a POF Context: Overview
Creating an IPortableObject Implementation (.NET)
Creating a PortableObject Implementation (Java)
Registering Custom Types on the .NET Client
Registering Custom Types in the Cluster
Evolvable Portable User Types
Making Types Portable Without Modification
21
Continuous Query Cache for .NET Clients
Uses of Continuous Query Caching
The Continuous Query Cache
Constructing a Continuous Query Cache
Cleaning up Resources Associated with a ContinuousQueryCache
Semi- and Fully-Materialized Views
Listening to a Continuous Query Cache
Achieving a Stable Materialized View
Support for Synchronous and Asynchronous Listeners
Making a Continuous Query Cache Read-Only
22
Remote Invocation Service for .NET Clients
Configuring and Using the Remote Invocation Service
23
Using Network Filters for .NET Clients
Custom Filters
Configuring Filters
24
Performing Transactions for .NET Clients
Using the Transaction API within an Entry Processor
Creating a Stub Class for a Transactional Entry Processor
Registering a Transactional Entry Processor User Type
Configuring the Cluster-Side Transactional Caches
Configuring the Client-Side Remote Cache
Using a Transactional Entry Processor from a .NET Client
25
Managing ASP.NET Session State
Overview
Setting Up Coherence Session Management
Enable the Coherence Session Provider
Configure the Cluster-Side ASP Session Caches
Configure a Client-Side ASP Session Remote Cache
Selecting a Session Model
Specify the Session Model
Registering the Backing Map Listener
Specifying a Serializer
Using POF for Session Serialization
Sharing Session State Across Applications
26
Sample Windows Forms Application for .NET Clients
General Instructions
Create a Windows Application Project
Add a Reference to the Coherence for .NET Library
Create an App.config File
Create Coherence for .NET Configuration Files
Create and Design the Application
Implement the Application
27
Sample Web Application for .NET Clients
General Instructions
Create an ASP.NET Project
Add a Reference to the Coherence for .NET Library
Configure the Web.config File
Create Coherence for .NET Configuration Files
Create the Web Form
Implement the Web Application
Global.asax File
Business Object Definition
Service Layer Implementation
Code-behind the ASP.NET Page
Scripting on this page enhances content navigation, but does not change the content in any way.