<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.   
-->
<chapter id="introduction">
  <title>Introduction</title>
  
  <section id="introduction_what_is_slice">
     <title>What is Slice?</title>
     <para>
     Slice extends OpenJPA for distributed databases. Slice plugs-in to OpenJPA
     runtime as a single library and can be activated by configuring
     a persistence unit for multiple databases. 
     </para>
     <para>
     Once configured for Slice, an existing OpenJPA application can transact
     against multiple databases in the same transaction. The application 
     queries will be executed in parallel against all the databases and
     any update will be committed to the appropriate databases. 
     </para>
   </section>
   
   <section id="introduction_background">
     <title>Background</title>
     <para>
     Java Persistence API (JPA) is a industry-standard specification for persistence of Java objects to 
     relational database. JPA standardizes the complex object-relational mapping
     problem and is supported by mature implementations from vendors such as
     BEA Kodo, JBoss Hibernate or Oracle Toplink. JPA is
     also the persistence service for EJB 3.0 in JEE environment.
     </para>
     
     <para>
     <ulink url="http://openjpa.apache.org">OpenJPA</ulink> - a top level Apache 
     Open Source Project
     - is a feature-rich, production-quality implementation of JPA. 
     OpenJPA supports numerous extended features over JPA standards and
     its well-crafted architecture allows a sophisticated plug-in framework for 
     addition of new features.
     </para>
     <para>
     Slice is one such plug-in extension to enable any OpenJPA-based application
     to work with distributed, horizontally-partitioned, possibly heterogeneous 
     databases <emphasis>without</emphasis> any change
     to application code or the persistent domain model. 
     </para>
  </section>
  
    
  
    <section id="why">
    <title>Why Slice?</title>
    <para>
    Enterprise applications are increasingly using a distributed databases.
    The reasons for distributed, often horizontally-partitioned databases can
    be to counter massive data growth, or to support multiple external clients 
    on a hosted platform and in many other scenarios that may benefit from 
    data partitioning.
    </para>
    
    <para>
    Any JPA-based user application has to address serious technical and conceptual
    challenges if it tries to directly interact with a set of physical databases
    within a single transaction. 
    Slice encapsulates this complexity of distributed database interaction  
    via the abstraction of a virtual database which internally 
    manages multiple physical databases henceforth referred as <emphasis>database
    slice</emphasis>. 
    This <emphasis>virtualization</emphasis> of distributed databases approach
    makes OpenJPA's object management kernel and 
    the user application to work in the same way as in case of a single physical 
    database. Via this database virtualization approach, Slice effectively 
    provides the user application an object-oriented view over a distributed set 
    of, possibly heterogeneous, databases,
    </para>
  </section>
  
  
  
  <section id="introduction_purpose">
     <title>Purpose of this Document</title>
     <para>
     This document describes how to use Slice to enable OpenJPA applications
     for distributed database environment. This document also discusses the
     architecture and critical design aspects of Slice.  
     </para>
  </section>
  
  <section id="introduction_audience">
    <title>Intended Audience</title>
    <para>
    This document is intended for developers interested in building
    distributed database applications using OpenJPA. This document assumes 
    familiarity with OpenJPA usage and distributed database environment.
    </para>
    <para>
    This document is also targeted for developers who are interested in 
    extending OpenJPA or its basic architectural aspects. 
    </para>
   </section>
   &homer;
</chapter>
  