Same Platform Class Versioning [Deprecated]
If you have multiple applications connected to your cache environment, you will not be able to upgrade these client applications simultaneously. However, when certain classes are upgraded in some applications, how can they share data with the older versions of the applications? This is where Class Versioning comes in.
If your class is serializable and you write objects of the class to a data source, you must use the same version of the class to read them back. Any changes to the class can lead to version mismatches, making any previously stored data unreadable.
With NCache's Class Versioning Compatibility feature for the same platforms, you can enable class versioning by configuring it through administrative cache tools and mapping attributes to the target class. For more details, refer to Registering Classes for Portable Data Sharing.
Class Attributes Mapping
By mapping the common attributes between versions, NCache enables backward and forward compatibility, as shown below:
Class Attributes Mapping | |
---|---|
ProductV2 Class (C#) | ProductV1 Class (C#) |
id | id |
name | name |
price | price |
quantity | quantity |
discount |
Once you map ProductV2 to ProductV1, you'll be able to store ProductV2 and retrieve it as ProductV1, and vice versa.
See Also
Upgrade NCache Version Offline
Live Upgrade NCache Version
IP Binding with Multiple NICs
Graceful Node Down