1 Reply Latest reply on Jul 20, 2002 8:08 AM by Sacha Labourey

    [Feature Fantasy] Putting DB Clustering using CMP?

    Brian Guan Newbie

      Hi all,

      I am relatively new to JBoss - so I hope I am not asking
      for something that is already done or have been proven not feasible.

      Anyway, even though I realize clustering is still relatively new to JBoss and will have lots of kinks to work out in the next few months, I would like to propose a fantasy feature...

      A while back, I have the "pleasure" to put together a big HA site using multiple weblogic servers sitting on top of 2 oracle servers in a DB cluster with transparent fail-over/fail-back. It took a lot of work, and it was painful, not to mention costly.

      I then came across the following idea:

      - Wouldn't it be nice if by using an J2EE server with
      clustering support (specifically CMP clustering), and
      just by changing deployment config, one can auto-
      magically get Database clustering? Without relying on
      expensive, proprietary, pesky RDBMS vendor hacks or
      DB replication technology, and total code
      transparency ...

      Logically, it seems as long as the databases support XA, it could be done - the slowest, "simplest" case being the J2EE server cluster always use 2-phase commit to write records to every instance of DBs in the cluster, so during a failover, an app server can switch to another DB in the cluster safely. However, once the failed DB is resurrected and wants to rejoin the cluster, the app server cluster will then need to bring it up-to-date before allowing it to rejoin.

      In this manner, one can conceivably build real HA sites with redundant everything using say... multiple JBoss boxes on top of multiple Postgres boxes. This takes a task traditionally performed in the database tier and put it in the app server tier.

      Well, anyone wants to add this to JBoss?

        • 1. Re: [Feature Fantasy] Putting DB Clustering using CMP?
          Sacha Labourey Master

          Hello,

          As you mention, as long as everything goes without any problem, it is not that hard to implement database "duplication" or "synchronisation". The problems occur when one db dies: what happens when you switch it again? its state is no more in-synch. How to resynchronize this state "live" (while work is still in progress on the other db)? This is related to state transfer and is not trivial to do. BTW, packages exist for open source databases to get replication (check for PostgreSQL and Interbase for example)

          Cheers,



          Sacha