ESCADA is a portable and flexible database replication system that accommodates multiple reliability, performance, and applicability tradeoffs: Target scenarios range from shared-nothing clusters to remote sites for disaster prevention. Currently supported database management systems include Apache Derby, PostgreSQL, and MySQL.


The following 3-step process will allow you to set up and test a replicated Apache Derby server in a synchronous master/slave configuration with automatic fail-over and recovery. Since all dependencies are included, the only requirement is having Java Runtime (JRE) 1.5 already installed.

Step 1: Download

Download escada-0.5-quickstart-derby.tar.gz and unpack it.

Step 2: Set Up

Initialize the database replicas by running the create-sample-databases script found in the resulting folder. You can customize the schema to be created by editing the script. By default, two replicas will be created, but the script accepts a numeric parameter to specify the number of replicas.

If you wish to run replicas in different physical hosts, move each of the created replicas to the desired location. This is optional, as different replicas will run just fine simultaneously in the same host.

Note: If you have configured the management console in the file etc/spring/applicationContext-mx.xml please remember that you will have to change the jetty port number for each instance of escada.

Step 3: Run

Start replica 1 by invoking the startNetworkServer script in folder replica-1. This replica is now on-line and fully functional.

You will have to boot the group communication. Either:

  • point browser to localhost:<configured_port> (if activated management console - default port 8080) and press button: "Boot Group";
  • or, open jconsole and point it to the host running escada. Choose remote connection and enter hostname and port (default: 8999). Navigate to the Appia MBeans net.sf.appia.core.Channel and choose one MBean. In the operations tab, press: primary:set primary.

Start (or restart) additional replicas using the startNetworkServer script. The new replica will catch up by transferring missing updates.

Try the following on ij in replica 1 (port 1527), which is the current master:

    connect 'jdbc:derby://localhost:1527/test';
    insert into test(a,b) values(1,2);

and then check the result on replica 2 (port 1528), which is currently a slave:

    connect 'jdbc:derby://localhost:1528/test';
    select * from test;

Finally, try killing one replica and bringing it up again. Note that if the current master replica fails, one of the slaves takes over automatically.


We welcome your feedback in the support pages. Also, the GORDA mailing list hosts general discussion about the technology underlying ESCADA.