You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2015/09/15 18:49:45 UTC

svn commit: r1703252 - in /sling/site/trunk/content/documentation: bundles.mdtext bundles/nosql-resource-providers.mdtext

Author: sseifert
Date: Tue Sep 15 16:49:44 2015
New Revision: 1703252

URL: http://svn.apache.org/r1703252
Log:
SLING-4381/SLING-5024 nosql resource provider documentation

Added:
    sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext
Modified:
    sling/site/trunk/content/documentation/bundles.mdtext

Modified: sling/site/trunk/content/documentation/bundles.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles.mdtext?rev=1703252&r1=1703251&r2=1703252&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles.mdtext Tue Sep 15 16:49:44 2015
@@ -12,6 +12,7 @@ Title: Bundles
 
 * [Accessing Filesystem Resources (org.apache.sling.fsresource)]({{ refs.accessing-filesystem-resources-extensions-fsresource.path }})
 * [Bundle Resources (extensions.bundleresource)]({{ refs.bundle-resources-extensions-bundleresource.path }})
+* [NoSQL Resource Providers (org.apache.sling.nosql)]({{ refs.nosql-resource-providers.path }})
 
 ## Users, Groups, Access, Permissions, ACLs on Resources
 

Added: sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext?rev=1703252&view=auto
==============================================================================
--- sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext (added)
+++ sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext Tue Sep 15 16:49:44 2015
@@ -0,0 +1,29 @@
+Title: NoSQL Resource Providers (org.apache.sling.nosql)
+[TOC]
+
+
+## Introduction
+
+Apache Sling provides resource-based access to NoSQL document stores like MongoDB and Couchbase via its Resource API using the NoSQL resource providers. This is possible in combination with a JCR-based repository (e.g. only on a special path in the resource tree), or a only persistence for the whole resource tree depending on the resource provider configuration.
+
+The general concept of retrieving from and storing resource data in NoSQL document stores is the same independently from the NoSQL product used:
+* For each resource a structured document is stored (usually in JSON format)
+* The path of the resource is the key of the document
+* The properties of the resource are stored in a map-like form in the document
+* Special mapping applies to convert special data types like numbers, dates and binary data to a format that can safely stored in the document event if the format is not natively supported (e.g. converting dates to strings and binary to base64)
+* The Sling CRUD support defines a simple transaction model with buffering all changes in memory until a call to "commit()" persists them to the NoSQL database
+* Iterating over child resources and deleting a resource including all descendants requires some basic query capabilities in the NoSQL store
+
+All these general features are implemented in an abstraction layer called ["Apache Sling NoSQL Generic Resource Provider"](https://svn.apache.org/repos/asf/sling/trunk/contrib/nosql/generic), which is used by the resource provider implementations per NoSQL product. Those implementation than only implement a thin "adapter" which maps the resource data to the NoSQL product-specific storage formats and query capabilities, without having to care about all the complex resource provider handling.
+
+This generic resource provider also contains a set of integration tests covering the most relevant resource read- and write usecases which can be used to test a NoSQL product-specific  resource provider implementation and the underlying NoSQL database.
+
+
+## MongoDB NoSQL Resource Provider
+
+tbd.
+
+
+## Couchbase NoSQL Resource Provider
+
+tbd.