S
sss.zhou
I want to write a java server application. 10G maybe a very large
size for my data, hence I wanted to using HSQLDB as my database. But
my application should be a double hot standby system.
Two same servers should be running on the separate machine at the same
time. So the main problem is data synchronization. If I have enough
time for switch the server, the solution may be easy, but the
requirement is that one server is crashed the other should replace it
for working in several seconds.
The first sign is my head is that I can do it by myself. I could do
it in the following steps:
Project 1: doing it all by my self;
1. In the working server, every INSERT, UPDATE, DELTET and
CREATE SQL sentences, I had written it into a txt file, to avoid the
file became to large, every day generate a file, such as:
..... SQL_20070824.sql, SQL_20070825.SQL ....
2. using linux sync command to sync these files from WORKING
server to BACKUP server, at every day 0:01 the BACKUP server import
the SQL into itself;
3. When the Working server crashed, the BACKUP server imported
the current day SQL immediately (at most cases, one day's data can
import in several seconds.), so the BACKUP server become the WORKING
Server;
After some days, I thought that these working must have been done
by some practiced database or software. So I did some research for
HSQLDB, I found this pages: http://hsqldb.sourceforge.net/web/hsqlDocsFrame.html,
but it didn't introduce some two database synchronization, It was just
data recovery in one database.
So is there a way for HSQLDB to deal with data synchronization? Or
some other soft can solve this problem? Or other free database can (I
know oracle can, but it is too expensive.)?
BTW, I had also using Hibernate in my application, can this solve
my data synchronization problem?
size for my data, hence I wanted to using HSQLDB as my database. But
my application should be a double hot standby system.
Two same servers should be running on the separate machine at the same
time. So the main problem is data synchronization. If I have enough
time for switch the server, the solution may be easy, but the
requirement is that one server is crashed the other should replace it
for working in several seconds.
The first sign is my head is that I can do it by myself. I could do
it in the following steps:
Project 1: doing it all by my self;
1. In the working server, every INSERT, UPDATE, DELTET and
CREATE SQL sentences, I had written it into a txt file, to avoid the
file became to large, every day generate a file, such as:
..... SQL_20070824.sql, SQL_20070825.SQL ....
2. using linux sync command to sync these files from WORKING
server to BACKUP server, at every day 0:01 the BACKUP server import
the SQL into itself;
3. When the Working server crashed, the BACKUP server imported
the current day SQL immediately (at most cases, one day's data can
import in several seconds.), so the BACKUP server become the WORKING
Server;
After some days, I thought that these working must have been done
by some practiced database or software. So I did some research for
HSQLDB, I found this pages: http://hsqldb.sourceforge.net/web/hsqlDocsFrame.html,
but it didn't introduce some two database synchronization, It was just
data recovery in one database.
So is there a way for HSQLDB to deal with data synchronization? Or
some other soft can solve this problem? Or other free database can (I
know oracle can, but it is too expensive.)?
BTW, I had also using Hibernate in my application, can this solve
my data synchronization problem?