Some cleanup, refactored out a chapter on the samples.

This commit is contained in:
Anders Nawroth
2011-02-22 17:58:58 +01:00
parent 7b170e42f2
commit a611359abb
9 changed files with 123 additions and 52 deletions

View File

@@ -170,6 +170,12 @@
<version>4.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.media</groupId>
<artifactId>jai_core</artifactId>
<version>1.1.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<configuration>
<includes>index.xml</includes>

View File

@@ -59,5 +59,6 @@
<xi:include href="programming-model.xml"/>
<xi:include href="setup.xml"/>
<xi:include href="cross-store.xml"/>
<xi:include href="samples.xml"/>
</part>
</book>

View File

@@ -4,14 +4,15 @@
<chapter id="get-started">
<title>Getting Started</title>
<para>The focus on NOSQL databases is a recent one, even if many of those stores have existed for some years now.
<para>NOSQL databases has come into focus only recently, even if some of them have existed for a few years by now.
That's why this document will not only guide you through the relevant parts of the DATAGRAPH
API, but also explain some key concepts of graph databases.
</para>
<para>
After reading this document, you should be able to integrate DATAGRAPH in your own existing or new applications.
After reading this document, you should be able to integrate DATAGRAPH into your existing or future applications.
If there are any issues that you don't understand or think are explained in a too complicated way, please report back any
problems or suggestions. This would also benefit future readers of this documentation.
problems or suggestions. Your input will also benefit future readers of this documentation. For details on how to get help
and provide feedback, see <xref linkend="get-started:help"/>.
</para>
<section id="get-started:first-steps">
@@ -32,13 +33,13 @@
to know the Spring APIs, understanding the concepts behind them is essential.
The Spring Framework documentation
<ulink url="http://www.springsource.org/documentation">home page</ulink> is a good starting point for
developers wanting become more familiar with Spring Framework.</para>
developers who want to become more familiar with Spring Framework.</para>
</section>
<section id="get-started:first-steps:nosql">
<title>Knowing NOSQL and graph databases</title>
<para>The recent interest in NOSQL databases is mainly driven by the need for finding the best suited storage solution for data
<para>The recent interest in NOSQL databases is mainly driven by the need to find the best suited storage solution for data
structured in a specific way. It should fit the data, not the other way round. Another issue is the scalability of the
database, especially with today's fast growing user bases handling large amounts of data in a short time. There are many NOSQL databases,
database, especially with today's fast growing user bases. There are many NOSQL databases,
and one should become familiar with the different concepts, advantages, and disadvantages before choosing
a solution. A problem with the NOSQL databases is the different data access APIs that are provided. Spring Data aims at easing this burden by
providing consistent abstractions over those APIs, leveraging SpringSource's experience and good reputation in this area.
@@ -55,31 +56,7 @@
and unit test cases (if you accessed the sources via
<ulink url="http://github.com/SpringSource/spring-data-graph">github</ulink> or Maven).
</para>
<para>The current distribution contains:</para>
<itemizedlist>
<listitem>
<para>Hello Worlds sample</para>
<para>The Hello Worlds sample application is a simple console application with unit tests, that
creates some Worlds (entities / nodes) and Rocket Routes (relationships) in a Galaxy (graph) and then
reads them back and prints them out.</para>
<para>The unit tests demonstrate some other features of DATAGRAPH. The sample comes with a minimal config for
Maven and spring to get up and running quickly.
</para>
</listitem>
<listitem>
<para>IMDB sample</para>
<para>A web application that imports datasets from the Internet Movie Database (IMDB) into the graph database. It allows listings of movies with their actors and actors with their roles in different movies. It also uses graph traversal operations to calculate the Kevin Bacon number (distance to an actor that has acted with Kevin Bacon). This sample application shows the basic usage of DATAGRAPH in a more complex setting with several annotated entities and relationships as well as usage of indices and graph traversal.</para>
</listitem>
<listitem>
<para>MyRestaurant sample</para>
<para>Simple webapp for managing users and restaurants, with the ability to add restaurants as favorites to a user.</para>
</listitem>
<listitem>
<para>MyRestaurant-Social sample</para>
<para>An extended version of the MyRestaurant sample application that adds social networking functionality to it. It is possible to have friends and to add rated relationships to restaurants. The relationships and some of the properties of the entities are transparently stored in the graph database. There is also a graph traversal that provides a recommendation based on your friends' (and their friends') rating of restaurants.</para>
</listitem>
</itemizedlist>
<para>Most of the samples are web applications that can be easily built and run using mvn jetty:run.</para>
<para>For more information on the samples, see <xref linkend="samples"/>.</para>
</section>
</section>

View File

@@ -5,10 +5,10 @@
<partintro>
<para>
This document is the reference guide for Spring Data Graph.
It explains the underlying concepts, usage, infrastructure of the framework and semantics for the used graph database.
It explains the underlying concepts, usage, infrastructure of the framework and the semantics for the used graph database.
</para>
<para>For an introduction to graph databases or Spring, or Spring Data examples, please refer to
<xref linkend="get-started"/> - this documentation refers only to Spring Data Graph and
assumes the reader is familiar with Spring concepts.</para>
</partintro>
<xref linkend="get-started"/>. This documentation refers only to Spring Data Graph and
assumes that the reader is familiar with Spring concepts.</para>
</partintro>

View File

@@ -1,15 +1,15 @@
<chapter id="requirements">
<title>Requirements</title>
<para>Spring Data Graph 1.x binaries require JDK level 6.0 and above,
<para>The Spring Data Graph 1.x binaries requires JDK level 6.0 or higher,
and <ulink url="http://www.springsource.org/documentation">Spring Framework</ulink>
3.0.x and above.</para>
3.0.x or higher.</para>
<para>
In terms of graph databases, <ulink url="http://www.neo4j.org/">Neo4j</ulink> version 1.2 and above is required.
Neo4j has a dependency on Apache Lucene for indexing. Users are encouraged to use the latest version of Neo4j
For the graph database binary, <ulink url="http://neo4j.org/">Neo4j</ulink> version 1.2 or higher is required.
Neo4j has a dependency on Apache Lucene for indexing. Users are encouraged to use the latest version of Neo4j
available.
</para>
<para>
For building the project, Apache Maven (version 2.10 and above) is strongly recommended.
</para>
</chapter>
</chapter>

View File

@@ -5,14 +5,15 @@
<title>Why Spring Data Graph?</title>
<para><ulink url="http://en.wikipedia.org/wiki/NoSQL">NOSQL</ulink>
stores provide alternative storage solutions that are more tailored to the needs of
the data structure requirements that are specific to each project than just using a relational
stores provide storage solutions that are more tailored to the specific
data storage requirements of each project than just using a relational
database as a "one-size-fits-all" solution.
</para>
<para>
Graph databases provide excellent support for network data, i.e. data that easily can be structured
as connected nodes. Property graph databases like Neo4j support arbitrary numbers of named properties on both
nodes and relationships. They are highly performant when traversing large, complex datasets with
Graph databases provide excellent support for graph-like data (networks); that is data that easily can
be structured as connected nodes.
Property graph databases like Neo4j support an arbitrary number of named properties on both
nodes and relationships. Neo4j is highly performant when traversing large, complex datasets with
millions of nodes and relationships, even on commodity hardware.
</para>
<para>
@@ -22,15 +23,18 @@
</para>
<para>The Spring Data Graph (or DATAGRAPH) framework makes it easy to
integrate graph databases in existing or new Spring applications by providing
integrate graph databases in existing or new Spring applications. It provides
infrastructure that reduces the amount of boilerplate data access code and uses
common patterns and idioms that are well known in the Spring Framework community.
Those practices are based on a simple POJO programming model that leverages annotations to add metadata and can be
integrated in any part of a Spring application, like the web or service layers.
Those practices are based on a simple POJO programming model that leverages
annotations to add metadata. It can be integrated in any part of a Spring application,
like the web or service layers.
</para>
<para>
A special use case of Spring Data Graph is the cross-store solution that can extend existing JPA data models with new parts
(properties, entities, relationships) that are stored exclusively in the graph while being transparently integrated with the JPA
entities. This enables for easy and seamless addition of new features that were not available before to JPA-based applications.
A special use case of Spring Data Graph is the cross-store solution that can extend
existing JPA data models with new, graph database backed parts (properties, entities, relationships).
These parts are stored exclusively in the graph database while being transparently
integrated with the JPA entities. This enables easy and seamless addition of new features
that have not been available to JPA-based applications previously.
</para>
</chapter>
</chapter>

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

83
src/docbkx/samples.xml Normal file
View File

@@ -0,0 +1,83 @@
<?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="samples">
<title>Samples</title>
<section id="samples:introduction">
<title>Introduction</title>
<para>
DATAGRAPH comes with a number of samples.
The source code of the samples is found on
<ulink url="http://github.com/SpringSource/spring-data-graph-examples">GitHub</ulink>.
The different sample projects are introduced below.
</para>
</section>
<section id="samples:hello-worlds">
<title>Hello Worlds sample</title>
<para>The Hello Worlds sample application is a simple console application with unit tests, that
creates some Worlds (entities / nodes) and Rocket Routes (relationships) in a Galaxy (graph)
and then reads them back and prints them out.</para>
<para>The unit tests demonstrate some other features of DATAGRAPH. The sample comes with a
minimal configuration for Maven and spring to get up and running quickly.</para>
<para>Executing the application creates the following graph in the Graph Database:</para>
<mediaobject>
<imageobject>
<imagedata fileref="images/helloworlds.png" />
</imageobject>
</mediaobject>
</section>
<section id="samples:imdb">
<title>IMDB sample</title>
<para>A web application that imports datasets from the Internet Movie Database (IMDB) into
the
graph database. It allows listings of movies with their actors and actors with their roles in
different movies. It also uses graph traversal operations to calculate the Kevin Bacon number
(distance to an actor that has acted with Kevin Bacon). This sample application shows the
basic usage of DATAGRAPH in a more complex setting with several annotated entities and
relationships as well as usage of indices and graph traversal.</para>
<para>See the readme file for instruction on how to compile and run the application.</para>
<para>An excerpt of the data stored in the Graph Database after executing the application:
</para>
<mediaobject>
<imageobject>
<imagedata fileref="images/imdb.png" />
</imageobject>
</mediaobject>
</section>
<!--
<section id="samples:myrestaurant-original">
<title>MyRestaurant sample</title>
<para>Simple web application for managing users and restaurants, with the ability to add
restaurants as
favorites to a user.</para>
<para>An excerpt of the data stored in the Graph Database after executing the application:
</para>
<mediaobject>
<imageobject>
<imagedata fileref="images/restaurant.png" />
</imageobject>
</mediaobject>
</section>
<section id="samples:myrestaurant-social">
<title>MyRestaurant-Social sample</title>
<para>An extended version of the MyRestaurant sample application that adds social networking
functionality to it. It is possible to have friends and to add rated relationships to
restaurants. The relationships and some of the properties of the entities are transparently
stored in the graph database. There is also a graph traversal that provides a recommendation
based on your friends' (and their friends') rating of restaurants. </para>
<para>An excerpt of the data stored in the Graph Database after executing the application:
</para>
<mediaobject>
<imageobject>
<imagedata fileref="images/restaurant-social.png" />
</imageobject>
</mediaobject>
</section>
-->
</chapter>