Maintaining multiple valid concurrent serialized object versions
First Claim
1. A computer-implemented method of enabling multiple compatible versions of serialized objects to be maintained concurrently, comprising steps of:
- determining a class name of a serialized object to be deserialized;
determining a version of the serialized object, wherein the version of the serialized object is a previously-computed version value computed over a class definition for the named class when the serialized object was serialized;
determining whether the serialized object can be deserialized to a target class definition for the named class, further comprising;
using the determined class name to programmatically consult a mapping to determine whether the version of the serialized object is identical to a current version of the target class definition, and if not, whether the version of the serialized object is compatible with the current version of the target class definition, wherein;
the mapping comprises at least one entry, each entry corresponding to a different class name and comprising (1) a current version value representing the current version for the corresponding class name, the current version value being computed over a current class definition for the corresponding class name, and (2) zero or more compatible version values, each of which represents a compatible version for the corresponding class name, the compatible version values each being computed over a non-current class definition for the corresponding class name, wherein each of the non-current class definitions is different from, but is to be treated as compatible with, the current class definition for the corresponding class name;
the version of the serialized object is identical to the current version of the target class definition if the version of the serialized object matches the current version value in the entry corresponding to the determined class name; and
the version of the serialized object is compatible with the current version of the target class definition if the version of the serialized object matches one of the compatible version values in the entry corresponding to the determined class name;
providing the current version value from the entry corresponding to the determined class name to a version checker used during the deserialization, as a substitute for the previously-computed version value, when the using step determines that the version of the serialized object is compatible with the current version of the target class definition, and providing the previously-computed version value otherwise; and
deserializing the serialized object to the target class definition only if the current version value, or the previously-computed version value, provided to the version checker matches the current version of the target class definition.
3 Assignments
0 Petitions
Accused Products
Abstract
Techniques are disclosed for concurrently maintaining serialized objects that were created from more than one version of a class definition. According to preferred embodiments, a component maps and enforces multiple valid stream-unique version identifiers (“SUIDs”) for a collection of class definitions (such as the classes of a software product that is undergoing change from one version to another). This component programmatically detects when an object'"'"'s SUID value does not match the code attempting to deserialize the object, and then programmatically determines whether the object is compatible with the code even though the SUID values do not match. Preferably, this determination is made by consulting a stored mapping, in which the SUIDs of compatible versions have been recorded.
45 Citations
6 Claims
-
1. A computer-implemented method of enabling multiple compatible versions of serialized objects to be maintained concurrently, comprising steps of:
-
determining a class name of a serialized object to be deserialized; determining a version of the serialized object, wherein the version of the serialized object is a previously-computed version value computed over a class definition for the named class when the serialized object was serialized; determining whether the serialized object can be deserialized to a target class definition for the named class, further comprising; using the determined class name to programmatically consult a mapping to determine whether the version of the serialized object is identical to a current version of the target class definition, and if not, whether the version of the serialized object is compatible with the current version of the target class definition, wherein; the mapping comprises at least one entry, each entry corresponding to a different class name and comprising (1) a current version value representing the current version for the corresponding class name, the current version value being computed over a current class definition for the corresponding class name, and (2) zero or more compatible version values, each of which represents a compatible version for the corresponding class name, the compatible version values each being computed over a non-current class definition for the corresponding class name, wherein each of the non-current class definitions is different from, but is to be treated as compatible with, the current class definition for the corresponding class name; the version of the serialized object is identical to the current version of the target class definition if the version of the serialized object matches the current version value in the entry corresponding to the determined class name; and the version of the serialized object is compatible with the current version of the target class definition if the version of the serialized object matches one of the compatible version values in the entry corresponding to the determined class name; providing the current version value from the entry corresponding to the determined class name to a version checker used during the deserialization, as a substitute for the previously-computed version value, when the using step determines that the version of the serialized object is compatible with the current version of the target class definition, and providing the previously-computed version value otherwise; and deserializing the serialized object to the target class definition only if the current version value, or the previously-computed version value, provided to the version checker matches the current version of the target class definition. - View Dependent Claims (2, 3, 4, 5, 6)
-
Specification