Conveniently, CORK System's source tree is well organized and can be efficiently extended, i.e. the related classes are placed together in each java package. In order to support the new back-end database system that saves and retrieves replicated objects, developers just need to deal with the edu.vt.cs.collab.cork.storage package on the CORK source tree. The good start point is to understand two classes, Storage and SerializationStorage classes under the edu.vt.cs.collab.cork.storage package.

The Storage class is the interface class to store key/value pairs. To best communicate with CORK system, a developer should implement this Storage interface according to his own database specification. This class that implements Storage interface takes a role of bridge between a back-end database and other parts of CORK system. Currently, CORK system uses the SerializationStorage class to implement Storage interface. Using SerializationStorage class, CORK system serializes objects and stores them into files under directory structure as a binary format (file names are created with timestamp and class name).

There is another interesting auxiliary class in the edu.vt.cs.collab.cork.storage package. JSXStorage class extends SerializationStorage to support the evolution of the classes. Java Serialization for XML (JSX) package enables objects to be written and read as XML. CORK objects from present application version can be migrated to the next version, despite class evolution, by processing the XML with XSLT, SAX, DOM, or JDOM. This JSXStorage class can be applied with other databases in order to support the evolution of the classes. More information about the JSX package can be found at http://www.csse.monash.edu.au/~bren/JSX/ .

To sum up, the thing that developers want to do in order to connect their database with CORK system is to implement the Storage interface. And SerializationStorage will be a good reference class to guide how to implement the Storage interface and replace the existing replicated object storage of CORK system with a new storage structure.



Back to Berkeley DB (Sleepycat) Storage


/public/projects/bridge/design/How to enhance the CORK Storage package with diverse databases Login | Web Editor | Full Editor
Last modified 9/11/03 1:00 PM by isenhour (history)
Site contents