Difference between revisions of "CDO/MongoDB Store"

From Eclipsepedia

< CDO
Jump to: navigation, search
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
 
The CDO MongoDB store is an implementation of a CDO Store that allows to store models and meta models to [http://www.mongodb.org/ MongoDB] databases.
 
The CDO MongoDB store is an implementation of a CDO Store that allows to store models and meta models to [http://www.mongodb.org/ MongoDB] databases.
  
The current implementation supports all [http://www.eclipse.org/cdo/documentation/relnotes_40/relnotes-4.0.html CDO 4.0] features with the following exceptions:
+
The current implementation has been developed and tested with MongoDB 1.6.5. It supports all [http://www.eclipse.org/cdo/documentation/relnotes_40/relnotes-4.0.html CDO 4.0] features with the following exceptions:
  
 
* NoExternalReferences (hence no meta references)
 
* NoExternalReferences (hence no meta references)
Line 14: Line 14:
 
This document will help users setup their environment and configure CDO to work with MongoDB.
 
This document will help users setup their environment and configure CDO to work with MongoDB.
  
== Installation ==
+
== Database Server ==
  
As the legal review is still pending as of now the CDO MongoDBStore can not be contributed to the CDO SDK. Consequently it is not yet part of the (Indigo) release train. But it is installable from the [http://www.eclipse.org/cdo/downloads/updates.php CDO Downloads] page.
+
Windows Example:
  
The MongoDB driver bundle is available at, e.g., [http://net4j.sourceforge.net/update http://net4j.sourceforge.net/update]. Ensure that you either install it '''before'' you try to install the CDO MongoDBStore or at least add this URL to the list of enabled software sites in your p2 preferences.
+
    C:\Programs\MongoDB\bin\mongod.exe --dbpath "C:\develop\ws\cdo\databases\specificDB" --noauth --rest
 +
 
 +
== Driver Bundle ==
 +
 
 +
The MongoDB driver bundle that is shipped with CDO is '''not identical''' to the one that is originally distributed via [http://www.mongodb.com mongodb.com]. The [http://dev.eclipse.org/svnroot/modeling/org.eclipse.emf.cdo/trunk/plugins/com.mongodb/src/org/bson/io/UTF8Encoding.java UTF-8 conversion class] had to be replaced by a version that uses the JRE mechanism to fulfill the legal requirements of the Eclipse Foundation. Performance degradation or misbehaviour may result. It is highly recommended that you download and deploy the original version of the MongoDB driver via
 +
[http://www.mongodb.org/display/DOCS/Java+Language+Center MongoDB Java Language Center].
  
 
== cdo-server.xml ==
 
== cdo-server.xml ==

Latest revision as of 06:11, 21 December 2012

The CDO MongoDB store is an implementation of a CDO Store that allows to store models and meta models to MongoDB databases.

The current implementation has been developed and tested with MongoDB 1.6.5. It supports all CDO 4.0 features with the following exceptions:

  • NoExternalReferences (hence no meta references)
  • NoQueryXRefs (hence no ensureReferentialIntegrity)
  • NoLargeObjects
  • NoFeatureMaps
  • NoHandleRevisions
  • NoRawAccess (hence no offline support)
  • NoBranching
  • NoCrashRecovery

This document will help users setup their environment and configure CDO to work with MongoDB.

[edit] Database Server

Windows Example:

   C:\Programs\MongoDB\bin\mongod.exe --dbpath "C:\develop\ws\cdo\databases\specificDB" --noauth --rest

[edit] Driver Bundle

The MongoDB driver bundle that is shipped with CDO is not identical to the one that is originally distributed via mongodb.com. The UTF-8 conversion class had to be replaced by a version that uses the JRE mechanism to fulfill the legal requirements of the Eclipse Foundation. Performance degradation or misbehaviour may result. It is highly recommended that you download and deploy the original version of the MongoDB driver via MongoDB Java Language Center.

[edit] cdo-server.xml

The type identifier of the store configuration is "mongodb":

 <store type="mongodb">
   <property name="uri" value="mongodb://localhost"/>
   <property name="db" value="specificDB"/>
   <property name="drop" value="false"/>
 </store>

The "db" property is optional. If omitted, the repository name is used as MongoDB database name.

The "drop" property is optional. If the value is "true" the MongoDB database is dropped before the store is activated.



Wikis: CDO | Net4j | EMF | Eclipse