Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Question about HSQLDB database synchronization

Thread view: 
sss.zhou@gmail.com - 24 Aug 2007 14:11 GMT
    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?
Thomas Kellerer - 24 Aug 2007 14:39 GMT
sss.zhou@gmail.com wrote on 24.08.2007 15:11:
>     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.

With that size you should go for a "real" database. HSQLDB is not really suited
for that job.

PostgreSQL is a very good database, and can easily cope with that volume.

There are several solutions to make Postgres a high availability system.

http://pgpool.projects.postgresql.org/
http://pgcluster.projects.postgresql.org/
http://www.slony.info/

As far as I know Slony is bundled with the installers.

MySQL would be another choice to handle the data volumen. It is not as feature
rich as PostgreSQL but offers replication out of the box (although I don't know
if this is true with the non-commercial license)

Finally there are tools like Sequoia which claim to make any group of DBMS a HA
environment.

http://sequoia.continuent.org/

Thomas
sss.zhou@gmail.com - 24 Aug 2007 16:31 GMT
On Aug 24, 9:39 pm, Thomas Kellerer <FJIFALSDG...@spammotel.com>
wrote:
> sss.z...@gmail.com wrote on 24.08.2007 15:11:
>
[quoted text clipped - 4 lines]
> With that size you should go for a "real" database. HSQLDB is not really suited
> for that job.

First thanks for you replying.
The other reason I choice HSQLDB because it can run as all in memory
and In-process model, the response time of my application is very
important, some requests must be response within 50ms.

The HSQLDB is a light-level database(If my opinion is wrong, corrected
me) and I just want a light level database.

I will also do some research for PostgreSQL  with you helpful guide.
Thomas Kellerer - 24 Aug 2007 16:33 GMT
sss.zhou@gmail.com wrote on 24.08.2007 17:31:
> First thanks for you replying.
> The other reason I choice HSQLDB because it can run as all in memory
> and In-process model, the response time of my application is very
> important, some requests must be response within 50ms.
And how do you plan to keep 10GB of data /in-memory/?

Thomas
sss.zhou@gmail.com - 24 Aug 2007 16:41 GMT
On 8 24 ,   11 33 , Thomas Kellerer <FJIFALSDG...@spammotel.com>
wrote:
> sss.z...@gmail.com wrote on 24.08.2007 17:31:> First thanks for you replying.
> > The other reason I choice HSQLDB because it can run as all in memory
[quoted text clipped - 4 lines]
>
> Thomas

10GB data contained 80% log data and these data needn't be loaded to
memory and every server has 8GB memory and I can using 6GB for my
server application and it is enough for 2GB data.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.