Alachisoft NCache 4.1 - Online Documentation

Data Sharing

NCache is providing both .net and java clients and there is a possibility of sharing same cache data among various clients either from same or different platforms. To make this sharing possible NCache introduces Data Sharing feature which not only allows the users to share cache content between various platforms but also provides the facility of class versioning within the same platform. Data sharing is a technique which dynamically serializes the objects at run time and makes it available for use in a very efficient way (in terms of time and cost). 
Data sharing also support class versioning as discussed above.  Class can have various versions associated with it having unique identifiers. Every new change in a class is recoded as a new version of a class. Using Data Sharing, different class versions can share cache contents among them at run time.
Data sharing is defined as the process of converting the state of an object (of any type) to some persistent state so that it can be understandable by clients from different platforms.  It is the process which allows user to dynamically serialize an object to make it portable for different platforms/versions. In this way user can make the state of data persistent so that it can be saved on a remote location and it will be accessible for all clients.
The most common methods available in market for data sharing is XML based sharing which is comparatively a slower solution. NCache introduced an efficient technique for Data Sharing that is the binary serialization of objects at runtime.
Data Sharing is a very magnificent feature for all those clients who are using both NCache .net and NCache java editions but have some limitation as listed below:
  • Custom generic types are not supported in java although they are supported in .Net.
  • In case of multiple versions, user needs to define the default version for Read-Thru/Write-Thru and CacheLoader.
  • An object registered in Data Sharing can’t be registered in Compact Serialization at a same time.
The following mapping should be considered while serializing a Java/.Net class:
Note: Users should only map Java attributes to .Net attributes incase of unsigned types.
In This Section
Explains how you can register shared types with NCache.
See Also
Helps you configure Clustered Cache.
Copyright © 2005-2012 Alachisoft. All rights reserved.