labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r606755 - in /labs/fluid/src/site/apt: download.apt index.apt manual.apt
Date Tue, 25 Dec 2007 05:35:27 GMT
Author: ppoddar
Date: Mon Dec 24 21:35:13 2007
New Revision: 606755

URL: http://svn.apache.org/viewvc?rev=606755&view=rev
Log:
docs

Modified:
    labs/fluid/src/site/apt/download.apt
    labs/fluid/src/site/apt/index.apt
    labs/fluid/src/site/apt/manual.apt

Modified: labs/fluid/src/site/apt/download.apt
URL: http://svn.apache.org/viewvc/labs/fluid/src/site/apt/download.apt?rev=606755&r1=606754&r2=606755&view=diff
==============================================================================
--- labs/fluid/src/site/apt/download.apt (original)
+++ labs/fluid/src/site/apt/download.apt Mon Dec 24 21:35:13 2007
@@ -3,9 +3,11 @@
  Slice is available as a single jar.
 
 *----------+---------------------------------------------------------------*
-|  Version |                                                               
+|  Version |                                 Download                              
 *----------+---------------------------------------------------------------*
 |  0.1.0   | {{{http://svn.apache.org/repos/asf/labs/fluid/slice/openjpa-slice-0.1.0-SNAPSHOT.jar}openjpa-slice-0.1.0-SNAPSHOT.jar}}
|
+*----------+---------------------------------------------------------------*
+|  0.2.0   | {{{http://svn.apache.org/repos/asf/labs/fluid/slice/openjpa-slice-0.2.0-SNAPSHOT.jar}openjpa-slice-0.2.0-SNAPSHOT.jar}}
|
 *----------+---------------------------------------------------------------*
 
 * Get the source code

Modified: labs/fluid/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/labs/fluid/src/site/apt/index.apt?rev=606755&r1=606754&r2=606755&view=diff
==============================================================================
--- labs/fluid/src/site/apt/index.apt (original)
+++ labs/fluid/src/site/apt/index.apt Mon Dec 24 21:35:13 2007
@@ -1,18 +1,39 @@
-Introduction
-			
- Slice extends {{{http://openjpa.apache.org}OpenJPA}} to work with distributed databases.
+Introduction to Slice
 
- OpenJPA is a mature and stable implementation of JPA API for persistence operations on Java
objects.
- An application can store and access objects using OpenJPA from a relational database.
- Slice is built as an extension of OpenJPA such that the objects can be distributed across
- a set of physical databases instead of a single one without any change to the application.
 
++-------------------------------------------------------------------------
+ Slice extends {{{http://openjpa.apache.org}OpenJPA}} to work with horizontally-partitioned,
distributed databases.
++-------------------------------------------------------------------------
 
- Of course, Slice needs a bit of help from the application developer. When a new
- object instance is inserted in the database, the application must select one of
- the physical databases for the instance to be persisted. For subsequent access
- and update, Slice will remember the original database of any instance.  
+[images/slice_small]        
 
+ Slice abstracts horizontally-partitioned, distributed databases as a single 
+ virtual database for OpenJPA so that the user application can use all OpenJPA 
+ features without the technical challenges of handling multiple databases.
+ {{{http://en.wikipedia.org/wiki/Partition_(database)}Horizontal partitioning}}
+ refers to partitioning of the rows of a table across many databases. 
+ We refer these underlying databases as <Slice> in this context.
  
+ The salient features of Slice are: 
+   
+   [[1.]] configured as a plug-in to OpenJPA runtime
+   
+   [[2.]] no change to the application or to the persistent domain model 
 
+   [[3.]] application decides the distribution of newly persistent instances
+   across multiple databases
+   
+   [[4.]] each slice can be configured independently, thereby opening up the
+   possibility where data is distributed across heterogeneous databases. 
+   
+ The <current> limitations are
+ 
+   [[1.]] no relationships across databases; hence the closure of 
+   an object graph must be collocated in the same database
+   
+   [[2.]] no two-phase commit protocol across multiple databases when local
+   transaction is local. If OpenJPA is configured for a JTA transaction, then 
+   the underlying slices participate in global transaction.
 
-[images/slice.png] JPA Persistence Service For Distributed Databases
\ No newline at end of file
+   [[3.]] no sorting of query result across multiple databases. 
+   
+   
\ No newline at end of file

Modified: labs/fluid/src/site/apt/manual.apt
URL: http://svn.apache.org/viewvc/labs/fluid/src/site/apt/manual.apt?rev=606755&r1=606754&r2=606755&view=diff
==============================================================================
--- labs/fluid/src/site/apt/manual.apt (original)
+++ labs/fluid/src/site/apt/manual.apt Mon Dec 24 21:35:13 2007
@@ -33,10 +33,14 @@
 
 * {What} is Slice?
 
- Slice is an extension of OpenJPA to work with horizontally-partitioned, distributed databases.
+ Slice is an extension of OpenJPA to work with 
+ {{{http://en.wikipedia.org/wiki/Partition_(database)}horizontally-partitioned}}, 
+ distributed databases.
  
- OpenJPA provides a mature and robust implementation of Java Persistence API (JPA) that 
- has emerged as the industry-standard specification for persistence of Java objects to relational
database. 
+ JPA has been established as a industry-standard specification for persistence of Java 
+ objects to relational database. OpenJPA is a mature, production-ready 
+ implementation of Java Persistence API (JPA) available as top level Apache 
+ Open Source Project.
  OpenJPA also supports numerous extended features over JPA specification and
  its well-crafted architecture allows a sophisticated plug-in framework for new features.
 
@@ -87,74 +91,86 @@
     Follow the steps to enable your OpenJPA application for distributed 
     databases with Slice:
 
-       [[1]] {{{manual.html#Download}Download Slice}}
+       [[1]] {{{manual.html#Configure}Configure persistence unit}}
+       
+       [[2]] {{{manual.html#Slice}Configure Slices}}
   
-       [[2]] {{{manual.html#Configure}Configure persistence unit}}
-  
-       [[3]] {{{manual.html#Implement}Implement Distribution Policy}}
+       [[3]] {{{manual.html#implements}Implement Distribution Policy}}
   
        [[4]] {{{manual.html#Run}Run your application}}
 
     []
     
-    * {Download} Slice
-
-         Slice is available for download as a single Java archive. 
-         Detailed instructions to access the source code, test cases and build from the
-         source are available in the {{{download.html}download}} page.
-
-    * {Configure} Persistence Unit
+     [[1]] {Configure} Persistence Unit
   
-            [[a]] Add the following in <<<META-INF/persistence.xml>>> to

-            activate and configure Slice:
-    
-+--------------------------------------+
-   <property name="openjpa.BrokerFactory" value="slice"/>
-+---------------------------------------+ 
+         Add the following in <<<META-INF/persistence.xml>>>:
+                
+--------------------------------------+
+         <property name="openjpa.BrokerFactory" value="slice"/>
+---------------------------------------+ 
  
-            [[b]] Specify ConnectionURL for multiple database URLs concatenated with | character.
+     [[2]] Configure the {Slice}s:
 
-+--------------------------------------+
-   <property name="openjpa.ConnectionURL" value="slice"/>
-+---------------------------------------+
- 
-            [[c]] Specify a Java class that implements DistributionPolicy
-
-+--------------------------------------
-   <property name="slice.DistributionPolicy" value="org.acme.foo.MyDistro"/>
-+----------------------------------------
-    []     
+         Each Slice has a unique URL
          
+--------------------------------------+
+         <property name="slice.One.ConnectionURL" value="jdbc:mysql://localhost/slice1"/>
+         <property name="slice.Two.ConnectionURL" value="jdbc:mysql://localhost/slice2"/>
+---------------------------------------+
+         will configure two slices named <<<One>>> and <<<Two>>>
with corresponding database
+         URL. Other properties of each slice can be configured separately, for example
+
+--------------------------------------+
+         <property name="slice.One.ConnectionUserName" value="user1"/>
+         <property name="slice.Two.ConnectionUserName" value="user2"/>
+---------------------------------------+
+
+         But, if you do not configure some property of a specific slice,
+         then the default value of a property is taken from corresponding 
+         <<<openjpa>>> property. For example, if you specify three slices
+         <<<One>>>, <<<Two>>> and <<<Three>>>
where <<<One>>> and <<<Two>>>
+         will be using same JDBC driver, but a different one for <<<Three>>>,
+                   then the configuration will be: 
+                   
+--------------------------------------+
+         <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
+         <property name="slice.Three.ConnectionDriverName" value="com.another.Driver"/>
+---------------------------------------+
+ 
+     [[3]] Specify a Java class that {implements} DistributionPolicy
 
-    * {Implement} Distribution Policy
-
-            {{{apidocs/org/apache/openjpa/slice/DistributionPolicy.html} 
-            org.apache.openjpa.slice.DistributionPolicy}}
-            is a simple interface with a single method. The interface is described as 
+--------------------------------------
+          <property name="slice.DistributionPolicy" value="org.acme.foo.MyDistro"/>
+----------------------------------------
+     
+           {{{apidocs/org/apache/openjpa/slice/DistributionPolicy.html} 
+           org.apache.openjpa.slice.DistributionPolicy}}
+           is a simple interface with a single method. The interface is described as 
 
-+-------------------------------------------------------
+-------------------------------------------------------
     /**
-     * Gets the index of the database where a given instance will be stored.
+     * Gets the name of the slice where a given instance will be stored.
      *  
      * @param pc The newly persistent or to-be-merged object. 
-     * @param urls the list of Connection URLs in the same order as specified 
-     * in the configuration.
+     * @param slices name of the configured slices.
+     * @param a opaque context for future use.
      * 
-     * @return an index in the given list. It is an error to return a value 
-     * that is out of bound of the given array.
+     * @return identifier of the slice. This name must match one of the
+     * configured slice names. 
+     * @see DistributedConfiguration#getSliceNames()
      */
-     int distribute(Object pc, String[] urls); 
-+-------------------------------------------------------
+    String distribute(Object pc, Set<String> slices, Object context);
+-------------------------------------------------------
       
       
 
-    * {Run} your application
+     [[4]] {Run} your application
 
-        That is it. 
+           That is it. 
   
-        Run your application as usual and Slice will persist and access the instances in

-        in the distributed database environment as configured in 
-        <<<META-INF/persistence.xml>>>.
+           Run your application as usual and Slice will persist and access the instances
in 
+           in the distributed database environment as configured in 
+           <<<META-INF/persistence.xml>>>.
 
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message