InfoQ

News

Apache Derby Releases 10.3 Beta and Gains Experimental Hot Standby Replication

Posted by Xandy Johnson on Jun 28, 2007

Community
Java
Topics
Data Access
Tags
Apache Derby

Apache Derby is a pure-Java, Open Source, relational database derived from IBM's Cloudscape. In the past couple weeks it has made two significant advances. First, the project made a beta available of the upcoming 10.3 release. The 10.3 release includes security enhancements, language-based ordering, other features, bug fixes, and performance enhancements. Second, Egil Sørensen, a student at the Norwegian University of Science and Technology, submitted his thesis work on replication and availability, including a prototype implementation.

The 10.3 release of Apache Derby is scheduled to be released on July 16. A beta is now available. In addition to performance enhancements and bug fixes, the major new features are:

  • DBA Powers - operations such as shutting down, encrypting, and upgrading the database are restricted to the database owner, rather than being allowed by any authenticated user.
  • Secure Server - the Network Server now runs with a Java security manager by default.
  • Language Based Ordering - locale-sensitive collation is now allowed rather than simply sorting by Unicode character codes.

Minor features include:

  • ALTER TABLE now supports DROP and RENAME of columns.
  • SSL/TLS communication between client and server is now supported.
  • It is now possible to enable client-side tracing without changing the application.
  • Support for import/export of tables with clob, blob and other binary type columns has been added.
  • JDBC methods for auto-generated keys have been implemented.
  • It is now possible to create a new empty table based upon a sub-query.

Egil Sørensen has submitted his MS thesis work to add hot standby replication functionality to Derby.

By implementing a hot standby scheme in Apache Derby several features are added. The contents of the database is replicated at run time to another site providing online runtime backup. As the hot standby takes over on faults availability is added in that a client can connect to the hot standby after a crash. Thus the crash is masked from the clients. In addition to this, online upgrades of software and hardware can be done by taking down one database at the time. Then when the upgrade is completed the upgraded server is synchronized and back online with no downtime.

A fully functional prototype of the Apache Derby hot standby scheme has been created in this project using logical logs, fail-fast takeovers and logical catchups after an internal up-to-crash recovery and reconnection.

The prototype was submitted as a patch against the 10.2.2.0 release (i.e. the latest production release), but it has already been ported to the trunk. There is another issue requesting that replication functionality be added.  As a result the patch may receive consideration for 10.4.

Catch Up by Thomas Mueller Posted Jun 29, 2007 2:19 AM
Re: Catch Up by Lublu Ludei Posted Jun 29, 2007 7:39 AM
Re: Catch Up by Thomas Mueller Posted Jun 29, 2007 8:40 AM
Re: Catch Up by Ashwin Jayaprakash Posted Jun 29, 2007 9:34 AM
Re: Catch Up by Thomas Mueller Posted Jun 29, 2007 11:25 AM
  1. Back to top

    Catch Up

    Jun 29, 2007 2:19 AM by Thomas Mueller

    The H2 Database Engine supports these features since quite a long time.
    Still interesting, specially hot standby (called 'Clustering' in H2).

  2. Back to top

    Re: Catch Up

    Jun 29, 2007 7:39 AM by Lublu Ludei

    But H2 sucks with multiple connections as it's primary role now to hold single-user connection.

  3. Back to top

    Re: Catch Up

    Jun 29, 2007 8:40 AM by Thomas Mueller

    > sucks with multiple connections

    Maybe the problem is the default settings? The default transaction isolation level of H2 is SERIALIZABLE. For Derby, it is READ COMMITTED. H2 supports that as well. To try it out, use the following database URL: jdbc:h2:~/test;LOCK_MODE=3.

  4. Back to top

    Re: Catch Up

    Jun 29, 2007 9:34 AM by Ashwin Jayaprakash

    Thomas, is the "Lock Mode = 3" feature now stable? Last time I asked this question, you said that it was experimental. Why don't you let the "Read Committed" mode be the default transaction level like other DBs?

  5. Back to top

    Re: Catch Up

    Jun 29, 2007 11:25 AM by Thomas Mueller

    Read Committed is stable now. I will think about making it the default, good idea!

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.