Configure and Deploy Backing Source
Once you have implemented the IReadThruProvider and IWriteThruProvider interfaces, you need to register and deploy your custom provider assembly to your cache cluster. NCache runs backing source providers in an isolated, server-side process to ensure cluster stability.
For detailed administration workflows, configuration file properties, and environment settings, see the complete docs on Configuring Read-Through Provider and Write-Through/Write-Behind Provider.
Deployment Workflow
To get your data source providers running on the cache server, follow this three-step workflow:
1. Build and Prepare Assemblies
- Compile the Class Library: Build your custom provider project to generate the required assembly files.
- Include Dependencies: Ensure your deployment package includes the main assembly (DLL) and any external third-party database or service drivers required by your data source connection logic.
- Mark Serialization: Ensure that all custom domain objects returned from or sent to your backend data source are marked with the [Serializable] attribute.
2. Configure the Provider
You can register your providers using either the NCache Management Center or PowerShell:
Through NCache Management Center
- Go to Clustered Caches -> View Details -> Advanced Settings -> Backing Source.
- Enable Read-Through/Write-Through and click Add Provider to enter the unique Provider Name, Class Name, and custom initialization arguments.
- For Write-Behind: Check Enable Write-Behind within your Write-Through settings to change operations from synchronous to asynchronous, then set your batching and retry limits.
Through PowerShell
- Use Add-BackingSource with
-ReadThruto configure a Read-through provider or-WriteThruto configure a Write-through provider. - For Write-behind configuration, configure the Write-through provider and applicable settings such as
-IsBatching,-BatchInterval,-OperationDelay,-OperationPerSecond,-OperationQueueLimit, and-OperationEvictionRatio. Write-behind mode is selected when performing the cache operation through the API.
3. Deploy
- Management Center Method: Use the Deploy Backing Source Provider button at the bottom of the page to automatically distribute the assemblies across all cluster nodes.
- Manual Method: Stop the cache and manually copy the files directly into the NCache deployment directory on all target nodes.
Important
Any changes to the provider source code require a full re-compile and re-deployment to take effect.