Maintaining Multiple Valid Concurrent Serialized Object Versions
First Claim
1. A computer-implemented system for enabling multiple compatible versions of serialized objects to be maintained concurrently, comprising:
- a computer comprising a processor; and
instructions which execute using the processor to implement functions comprising;
determining a class name and a version of a serialized object to be deserialized from a storage medium, 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 version of the serialized object is determined to be compatible with the current version of the target class definition, and providing the previously-computed version value otherwise; and
deserializing the serialized object from the storage medium 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.
2 Assignments
0 Petitions
Accused Products
Abstract
Maintaining Multiple Valid Concurrent Serialized Object Versions 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.
-
Citations
7 Claims
-
1. A computer-implemented system for enabling multiple compatible versions of serialized objects to be maintained concurrently, comprising:
-
a computer comprising a processor; and instructions which execute using the processor to implement functions comprising; determining a class name and a version of a serialized object to be deserialized from a storage medium, 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 version of the serialized object is determined to be compatible with the current version of the target class definition, and providing the previously-computed version value otherwise; and deserializing the serialized object from the storage medium 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. A computer program product comprising at least one computer-usable storage medium storing computer-usable program code for enabling multiple compatible versions of serialized objects to be maintained concurrently, the computer program product comprising:
-
computer-usable program code for determining a class name of serialized object to be deserialized; computer-usable program code for 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; computer-usable program code for determining whether the serialized object can be deserialized to a target class definition for the named class, further comprising; computer-usable program code for 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; computer-usable program code for 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 computer-usable program code for using 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 computer-usable program code for 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 (4, 5, 6, 7)
-
Specification