Author: sseifert
Date: Tue Sep 15 17:02:17 2015
New Revision: 1703258
URL: http://svn.apache.org/r1703258
Log:
SLING-4381/SLING-5024 nosql resource provider documentation
Modified:
sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext
Modified:
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=1703258&r1=1703257&r2=1703258&view=diff
==============================================================================
---
sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext
(original)
+++
sling/site/trunk/content/documentation/bundles/nosql-resource-providers.mdtext
Tue Sep 15 17:02:17 2015
@@ -7,6 +7,7 @@ Title: NoSQL Resource Providers (org.apa
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
@@ -21,9 +22,32 @@ This generic resource provider also cont
## MongoDB NoSQL Resource Provider
-tbd.
+Resource provider for [MongoDB](https://www.mongodb.org/) NoSQL database.
+
+Tested with MongoDB Server 3.0.6 and MongoDB Java Driver 3.0.4.
+
+Configuration example:
+
+```
+
org.apache.sling.nosql.mongodb.resourceprovider.MongoDBNoSqlResourceProviderFactory.factory.config
+ provider.roots=["/"]
+ connectionString="localhost:27017"
+ database="sling"
+ collection="resources"
+```
+
+See Apache Felix OSGi console for detailed documentation of the parameters.
All resource data is stored in one Collection of one MongoDB database. Each
resource is stored as a document with the path stored in an "_id" property.
+
+Source code: [Apache Sling NoSQL MongoDB Resource
Provider](https://svn.apache.org/repos/asf/sling/trunk/contrib/nosql/mongodb-resourceprovider)
+
+Please note: there is an [alternative MongoDB resource provider
implementation](https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/mongodb)
from 2012 which has less features, a slightly different concept for storing
resource data (in multiple collections), and it does not use the "Generic
Resource Provider".
## Couchbase NoSQL Resource Provider
tbd.
+
+
+## Writing your own NoSQL Resource Provider
+
+tbd.