[infinispan-issues] [JBoss JIRA] Commented: (ISPN-1103) Soft schema-based storage

Randall Hauch (JIRA) jira-events at lists.jboss.org
Mon Aug 8 12:14:24 EDT 2011


    [ https://issues.jboss.org/browse/ISPN-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619429#comment-12619429 ] 

Randall Hauch commented on ISPN-1103:
-------------------------------------

Here's a still-incomplete prototype of a new 'schematic' module, and I'm looking for feedback as to whether this is going in the right direction:

  https://github.com/rhauch/infinispan/tree/ISPN-1103/schematic

The new 'schematic' module contains a small document-oriented API layer on top of Infinispan and supports storing JSON and BSON documents and using JSON Schema documents to validate the structure of the documents. Rather than store the documents as strings within the Infinispan values, the value consists of a single Document with functionality that's a superset of BSON and JSON, with the goal being very efficient access and modification of the documents. Values are serialized using the BSON binary format representation. Documents are also immutable, with a simple "editable document" mechanism to allow the Infinispan values to "listen" for changes and to support DeltaAware functionality.

I had originally started to use other JSON and BSON implementations, but was not happy with the APIs. JSON libraries do not natively support binary values and other types, while BSON libraries were less mature. No JSON or BSON libraries had support for JSON Schema, though there is a relatively simplistic and mostly-complete add-on for the Jackson JSON library. Finally, implementing our own also means that we could provide an immutable API for general document access while still making it easy to create and edit documents such that DeltaAware and transaction functionality will work cleanly.

Perhaps it's useful/desirable to extract the JSON/BSON/JSON Schema functionality into a separate module or even a separate project (as it is likely useful in projects other than Infinispan). If so, please say so. But at this time I'm not worrying about that.

> Soft schema-based storage
> -------------------------
>
>                 Key: ISPN-1103
>                 URL: https://issues.jboss.org/browse/ISPN-1103
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Core API
>            Reporter: Manik Surtani
>            Assignee: Randall Hauch
>            Priority: Critical
>             Fix For: 5.1.0.BETA1, 5.1.0.FINAL
>
>
> This JIRA is about storing metadata alongside values.  Perhaps encapsulating values as SchematicValues, which could be described as:
> {code}
>   class SchematicValue {
>     String jsonMetadata;
>     String jsonObject;
>   }
> {code}
> Metadata would allow for a few interesting features:
> * Extracting of lifespan and timestamp data if manipulated over a remote protocol (REST, HotRod, etc)
> * Content type for REST responses
> * Timestamps and SHA-1 hashes, useful for for HTTP headers (e.g., ETag, Cache-control, etc.)
> * Validation information (may not be processed by Infinispan, but can be used by client libs)
> * Classloader/marshaller/classdef version info
> * General structure of the information stored
> * Reference to the schema for this document
> * Storage of older versions

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list