DATADOC-30 copied base docs from key-value -- thanks Costin

This commit is contained in:
Thomas Risberg
2010-12-17 16:20:57 -05:00
parent 9b81171305
commit 930e711ea5
35 changed files with 285 additions and 13 deletions

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<chapter id="mongodb">
<title>MongoDB support</title>
<para>One of the document stores supported by SDDOC is <ulink url="http://www.mongodb.org/">MongoDB</ulink>.
To quote the project home page:
<quote>
MongoDB (from "humongous") is a scalable, high-performance, open source, document-oriented database.
</quote>
<para>Spring Data Document provides easy configuration and access to MongoDB from a Spring application. Offers both low-level and
high-level abstraction for interacting with the store, freeing the user from infrastructural concerns.</para>
</para>
<section id="mongodb:requirements">
<title>MongoDB Requirements</title>
<para>SDDOC requires MongoDB 1.4 while 1.6 is recommended.
</para>
</section>
<section id="mongodb:architecture">
<title>MongoDB Support High Level View</title>
<para>The MongoDB support provides several components:</para>
<itemizedlist>
<listitem><emphasis>Configuration Factory</emphasis> - for configuring and handling communication with MongoDB via its Java driver</listitem>
<listitem><emphasis>Template implemenattion</emphasis> - providing a generified, user friendly template classes for interacting with MongoDB.
<xref linkend="mongodb:template"/> explains the abstraction builds on top of the low-level MongoDB Java API to handle the
storage and retrieval of documents plus mapping between documents and domain classes.</listitem>
<listitem><emphasis>Support Classes</emphasis> - that offer reusable components such as mapping support and exception translation.</listitem>
</itemizedlist>
<para>For most tasks, the higher-level abstractions and support services are the best choice. Note that at any point, one can move between layers - for example, it's very
easy to get a hold of the low level connection (org.mongo.DB) to communicate directly with MongoDB.</para>
</section>
<section id="mongodb:connectors">
<title>Connecting to MongoDB</title>
<para>One of the first tasks when using MongoDB and Spring is to connect to the store through the IoC container. To do that</para>
<para>The easiest way to work with a <interfacename>MongoFactoryBean</interfacename> is to configure ...</para>
</section>
<section id="mongodb:template">
<title>Working with Objects through <classname>MongoTemplate</classname></title>
<para>Most users are likely to use <classname>MongoTemplate</classname> and its corresponding package <literal>org.springframework.data.document.mongodb</literal> - the
template is in fact the central class of the MongoDB module due to its rich feature set.
The template offers a high-level abstraction for MongoDB interaction.
</para>
<table id="MongoDB-template-operations-view" pgwide="1">
<title>Operational views</title>
<tgroup cols="2">
<colspec colname="c1" colwidth="1*" align="center"/>
<colspec colname="c2" colwidth="1*" align="center"/>
<spanspec spanname="both" namest="c1" nameend="c2" colsep="0" align="center" />
<thead>
<row>
<entry>Interface</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><interfacename>Collection Operations</interfacename></entry>
<entry>MongoDB string (or value) operations</entry>
</row>
<row>
<entry><interfacename>Document Operations</interfacename></entry>
<entry>MongoDB list operations</entry>
</row>
</tbody>
</tgroup>
</table>
<para>Once configured, the template is thread-safe and can be reused across multiple instances.</para>
<para>Out of the box, <classname>MongoTemplate</classname> uses a Java-based default converter for most of its operations...</para>
</section>
<section id="mongodb:future">
<title>Roadmap ahead</title>
<para>Spring Data MongoDB project is in its early stages. We are interested in feedback, knowing what your use cases are, what are the common patters you encounter so that the MongoDB module
better serves your needs. Do contact us using the channels <link linkend="get-started:help:community">mentioned</link> above, we are interested in hearing from you!</para>
</section>
</chapter>