Chapter 29.  Distributed Persistence

Table of Contents

Overview
Salient Features
Transparency
Scaling
Distributed Query
Data Distribution
Data Replication
Heterogeneous Database
Distributed Transaction
Collocation Constraint
Usage
How to activate Slice Runtime?
How to configure each database slice?
Implement DistributionPolicy interface
Implement ReplicationPolicy interface
Configuration Properties
Global Properties
Per-Slice Properties

The standard JPA runtime environment works with a single database instance. Slice is a plug-in module for OpenJPA to work with multiple databases within the same transaction. Following sections describe the features and usage of Slice for distributed database environment.

Overview

Enterprise applications are increasingly deployed in distributed database environment. A distributed, horizontally-partitioned database environment can be an effective scaling strategy for growing data volume, to support multiple clients on a multi-tenant hosting platform and many other practical scenarios that can benefit from data partitioning.

Any JPA-based user application has to address demanding technical and conceptual challenges to interact with multiple physical databases within a single transaction. OpenJPA Slice encapsulates the complexity of distributed database environment via the abstraction of virtual database which internally manages multiple physical database instances referred as slice. Virtualization of distributed databases makes OpenJPA object management kernel and the user application to work in the same way as in the case of a single physical database.