Introduction to Slice +------------------------------------------------------------------------- Slice extends {{{http://openjpa.apache.org}OpenJPA}} to work with horizontally-partitioned, distributed databases. +------------------------------------------------------------------------- [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 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 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. [[3.]] no sorting of query result across multiple databases.