Oracle Berkeley DB Java Edition
Oracle Berkeley DB Java Edition is an open source, embeddable, transactional storage engine written entirely in Java. It takes full advantage of the Java environment to simplify development and deployment. The architecture of Oracle Berkeley DB Java Edition supports very high performance and concurrency for both read-intensive and write-intensive workloads. Depending on your needs choose between Berkeley DB Java Edition's Direct Persistence Layer (DPL), Persistent Collections API, or simply store key/value pairs of arbitrary data. If your application requires something outside the bounds of relational databases then Berkeley DB Java Edition is likely to be the best choice.
The majority of Java solutions use object-to-relational (ORM) solutions like the Java Persistence API (JPA) to map class and instance data into rows and columns in a RDBMS. Relational databases are well suited to data storage and analysis, however most persisted object data is never analyzed using ad-hoc SQL queries; it is usually simply retrieved and reconstituted as Java objects. Are you using ORM simply because it's there, or because you really need the features of SQL? The value of relational storage is lost on this basic task of object storage and retrieval. Berkeley DB Java Edition is different. Berkeley DB stores object graphs, objects in collections, or simple binary key/value data directly in an a btree on disk. This simple, highly efficient approach removes all the unnecessary overhead in ORM solutions. Using the Direct Persistence Layer (DPL) Java developers annotate classes with storage information, much like JPA. This approach is familiar, efficient, and fast. The DPL reduces the complexity of data storage while not sacrificing speed.
Berkeley DB Java Edition is different from all other Java databases available today. Berkeley DB Java Edition is not a relational engine built in Java. It is a Berkeley DB-style embedded store, with an interface designed for programmers, not DBAs. The architecture is based on a log-based, no-overwrite storage system, enabling high concurrency and speed while providing ACID transactions and record-level locking. Berkeley DB Java Edition efficiently caches most commonly used data in memory, without exceeding application-specified limits. In this way Berkeley DB Java Edition works with an application to use available JVM resources while providing access to very large data sets.
Berkeley DB Java Edition fits into the J2EE architecture by implementing three key APIs within J2EE. The Java Transaction API (JTA) enables Berkeley DB Java Edition to function as a managed transactional resource within an application server. Berkeley DB Java Edition also implements the J2EE Connector Architecture (JCA) to ease integration into application servers. Finally, once integrated and performing transactional operations, most applications will require some ability to manage a service. Berkeley DB Java Edition exports information and services using the Java Management Extensions (JMX). In concert JTA, JCA and JMX allow Berkeley DB Java Edition to operate to its fullest and in a predictable manner in J2EE-based solutions.
Berkeley DB Java Edition supports replication over multiple systems, enabling applications to scale massively with low latency and provide fault tolerance for high availability solutions. This technique works by having all updates go to a designated master, which distributes changes automatically to a set of replicas. The read workload can be spread across the replicas, and new replicas can join the group at any time to scale the system. If any replica fails, the remaining replicas can take over for it. If a master node fails, the replicas will hold an election and designate a new master. Once the new master has been chosen, all of the replicas synchronize with it and move forward with normal processing with no interruption in service. The master-failover process generally takes only a fraction of a second and read-requests can be serviced by replicas during that fail-over period ensuring zero downtime.Data Storage
Berkeley DB Java Edition stores data quickly and easily without much of the overhead found in other databases. Berkeley DB Java Edition is a single JAR file that runs in the same JVM as your application, so there is no remote server. A local cache keeps the most active data in memory, avoiding costly disk access, and bounds the usage of JVM memory to a predictable amount.
Berkeley DB Java Edition stores data reliably and ensures data integrity. In the event of a system failure, Berkeley DB Java Edition will recover transactional data and reset the system to a functional and consistent state from log and database information.
Berkeley DB Java Edition is highly portable, very flexible and easy to integrate. It was designed from day one as a pure Java product taking full advantage of the Java environment. As a single Java Archive (JAR) file, it runs within the JVM running your application. Berkeley DB Java Edition was designed to serve the large and growing Java community with a enterprise-grade, pure Java, data storage solution.