Redundancy elimination in the persistence of object graphs

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000, C709S241000, C709S241000

Reexamination Certificate

active

06301585

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates generally to computer software. More particularly, the invention relates to the persistent storage of object-oriented components.
2. Description of the Related Art
There are many benefits associated with modularity and object-oriented programming paradigms in software designs. One such benefit is the use of reusable components. JavaBeans™ is one example of an object-oriented, software component model. Reusable components such as JavaBeans™ can be used as building blocks in composing applications. For example, a builder tool could be used to connect together and customize a set of JavaBeans™ components to act as an application. In this example, JavaBeans™ could include GUI elements such as windows and buttons that can be nested inside one another in an object graph. Reusable components can also be used more like stand-alone applications. For example, a JavaBean™ which implements a spreadsheet could be embedded in a web page or in another suitable container.
In any reusable component system, it is important to provide storage of components in a persistent form. When the reusable components are implemented in an object-oriented language, persistent storage can be achieved through serialization: a process of transforming one or more objects from a run-time or transient form to a persistent form. In other words, serialization is a process of recording the state of an object graph in such a way that the object graph can be reconstituted at a later time. Serialization is applicable not only to reusable components, but to any objects.
One approach to serialization, the default object serialization provided by the Java™ Language, flattens a graph of objects into a byte stream by taking a “snapshot” of memory. The byte stream can then be stored in one or more persistent containers such as files. Subsequently, the byte stream can be reconstituted into live Java™ Language objects through the process of deserialization. This approach, however, has many drawbacks. The snapshot of the live object graph is linked to the internal implementation of classes rather than to the public APIs of classes. This approach also produces a large amount of data to store. Furthermore, the data produced by this approach is in a binary format which cannot be edited manually using a standard text editor.
Another approach is to serialize an object graph in a textual format which is readable and editable by hand. For example, this approach could be implemented as shown in the following high-level pseudo-code, wherein the serialization output text generated by write() is based on Java™ Language source code:
writeObject(Object node) {
nodeName=<generate a symbol>
write(nodeName+“=new ”+node.class +“()\n”);
for each property p in node.class.properties do {
write(nodeName+“.”+p.name+“=”+
writeObject(p.value(node))+“\n”);
}
return name;
}
The approaches described above store all values, even default values, for objects. When many values of a object are default values, as is often the case, then huge amounts space are effectively wasted.
Another approach to serialization is to save space in the serialized file by storing meta-data which specifies default values of classes. In systems such as Delphi and Visual Basic, however, this approach is implemented only for primitive values, and not for value types that comprise objects. Furthermore, this approach is error-prone in that it leaves default information in two places: in the serialized meta-data and in the constructor.
Therefore, it is desirable to provide an improved system and method for serializing an object graph.
SUMMARY OF THE INVENTION
The problems outlined above are in large part solved by various embodiments of a method and system for incrementally serializing an object graph to a persistent form. In one embodiment, incremental serialization provides a number of advantages over previous methods, including: robustness through version changes in the Java™ Virtual Machine and in class libraries, textual output that is editable by hand using a standard text editor, comprehensive use of defaults to minimize serialized file size, and performance which varies linearly with the size of the object graph. Serialization according to the present disclosure may be applicable to any objects which have constructors and properties.
An object graph is a set of nested objects. Each object has one or more properties, and each property has a value. Property values in one embodiment may be objects. In one embodiment, the objects are reusable components such as JavaBeans™. In one embodiment, serialization is implemented using the resources of the object-oriented Java™ Platform and the object-oriented Java™ Language.
In one embodiment, the object graph exists in a first environment. The object graph in the first environment is serialized to a temporary or intermediate serialized form, such as, for example, a memory location within the serializer. The temporary or intermediate serialized form comprises two types of statements: a first type of statement for instantiating a new object, and a second type of statement for assigning values to the properties of the object. At substantially the same time as the serialization, the temporary or intermediate serialized form is deserialized (or evaluated) in a second environment, outside the scope of the first environment. Typically, each object is instantiated in the second environment through deserialization of the instantiation statements. In one embodiment, instantiation takes place through the invocation of a constructor for the object's class. A constructor creates a new object and assigns default values to properties of the object in the second environment. In this way, a copy of each object is created in the second environment, wherein the properties of the new object have their default values.
After an object has been instantiated, the assignment statements for the object are examined. In one embodiment, the introspection function of JavaBeans™ is used to generate a list of properties of objects. Statement by statement, the potential assignment statements are examined with respect to the state of the second environment. Only assignment statements in the temporary or intermediate serialized form that would alter the second environment are maintained in the final serialized form. In one embodiment, the comparison takes place on the left-hand and right-hand sides of each assignment statement using the “equals” method defined on a Java™ Object. After comparing and possibly serializing the property assignment(s), deserialization of the object is completed by performing the assignments and/or other operations in the second environment. Redundant assignment statements are discarded and are not maintained in the final serialized form. In one embodiment, redundant instantiations are discarded in a similar way.
The properties of classes are accessed through public APIs to avoid reliance on private implementations of classes. Therefore, serialized forms will typically still be deserializable even when private implementations are different across different platforms or across the same platform over time. In one embodiment, incremental serialization includes error recovery and mechanisms to handle several special cases.


REFERENCES:
patent: 5715447 (1998-02-01), Hayashi et al.
patent: 5860009 (1999-01-01), Uchihara et al.
patent: 5917422 (1999-06-01), Adamec et al.
patent: 6012059 (2000-01-01), Neimat et al.
Noble et al., “Scalable visualisations with ownership trees”, Technology of Object-Oriented Languages and Systems, 2000. 37th International Conferenc on, pp. 202-213, Nov. 2000.*
Hill et al., “Visualizing the structure of object-oriented systems”, Visual Languages, 2000 Proceedings. IEEE International Symposium on, pp. 191-198, Sep. 2000.*
Nakajima, “An adaptive object storage system for mobile computers”, Parallel and Distributed Systems, Workshops, Seventh Interna

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Redundancy elimination in the persistence of object graphs does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Redundancy elimination in the persistence of object graphs, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Redundancy elimination in the persistence of object graphs will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2600776

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.