db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Böttcher <Frank.Boettc...@schiffl.de>
Subject AW: Replicate multiple Database Instances
Date Thu, 01 Jul 2010 12:53:22 GMT
Hi,

Thx for the quick reply. In this case I will do the synchronizing by my main application.

Regads,

Frank

-----Ursprüngliche Nachricht-----
Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
Gesendet: Montag, 28. Juni 2010 21:28
An: Derby Discussion
Betreff: Re: Replicate multiple Database Instances

Frank Böttcher <Frank.Boettcher@schiffl.de> writes:

Hi,

each master database can only have one slave database currently.
A Derby instance *can* act as master for one database and as slave for
another database, I think.

So I guess you could set it up like in a ring:

   m1: db1(master)           db3(slave)
   m2: db1(slave) db2(master)
   m3             db2(slave) db3(master)

There is no automation currently; when a master dies, the slave needs
to be told to take over explicitly. Client code would also detect the
need to start talking to the now new master. Since replication is
asynchronous, the slave is not guaranteed to hold all committed data
on the master but should be transactionally consistent.

Hope this helps,
Dag


> Hi,
>
> I have read the manual, but I am still not sure if derby could fulfill my needs.
>
> I need to have 3 or more physical machines. Each of the machines has its own database.
The database-scheme is identical for all of the machines. On every machine data is written.
I need to have all data to be synchron in all 3 databases. I thought I can do the following
to solve this problem.
>
> Machine one holds db1, the derby instance has the following roles: db1(master), db2(slave),
db3(slave).
> Machine two holds db2, the derby instance has the following roles: db1(slave), db2(master),
db3(slave).
> Machine three holds db3, the derby instance has the following roles: db1(slave), db2(slave),
db3(master).
>
> 1.Is it working like that?
> 2.How can I force the 3 database to synchronize each other on startup?
>
> Thx in advance for any help.
>
> Frank Boettcher
>
>

-- 
Dag H. Wanvik, staff engineer
Sun Microsystems, Java Core and Desktop - Java DB/Derby
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101
Sun IM: dw136674, Yahoo IM: dag_h_wanvik

Mime
View raw message