6 Replies Latest reply on Feb 17, 2003 1:09 PM by belaban

    Your ideal database for clustering?

    markuspr

      Hello together,

      in my last thread I had a problem using entity beans in my cluster. The problem was that JBoss doesn't do the replication in the current version.

      Now I'm looking for a free database that supports my scenario: I have a cluster of (finally) 15 hosts. Each host has it's own JBoss/Tomcat and database instance (MySQL at the moment). Requests coming from the web are distributed to one of the hosts by a load balancer.

      In this scenario I can't use Master/Slave database clustering, because only one master would be writeable for my entity beans. And because I can't configure the beans using another DB for writing than for reading I need another solution.
      That's why I need synchronous Master/Master database clustering. Synchronous would be ideal because I don't have any problems with lost updates or anything other.

      Because my cluster is an academical one I'll have to use a free database system. Oracle would be fine, but it is a little bit too expensive :-)
      So what are the alternative solutions?

      MySQL: Only supports Master/Slave
      PostgreSQL: Only supports Master/Slave, but there are some tools in development, supporting syn. Master/Master
      SAPDB: Seems to be a Master/Slave solution, too

      Do you know a free database that supports synchronous Master/Master replication?
      I have found no message in this forum saying: I use XYZ-DB. That's why I think this could be a nice discussion (and that's why I have started a new thread)!

      Cheers,
      Markus

        • 1. Re: Your ideal database for clustering?
          slaboure

          I guess there is for-pay plugin for Interbase but I don't know what it does.

          • 2. Re: Your ideal database for clustering?
            bongosdude

            What is the current version of Jboss you are talking here. Do you mean that JBoss wont cluster entity beans?

            > Hello together,
            >
            > in my last thread I had a problem using entity beans
            > in my cluster. The problem was that JBoss doesn't do
            > the replication in the current version.
            >
            > Now I'm looking for a free database that supports my
            > scenario: I have a cluster of (finally) 15 hosts.
            > Each host has it's own JBoss/Tomcat and database
            > instance (MySQL at the moment). Requests coming from
            > the web are distributed to one of the hosts by a load
            > balancer.
            >
            > In this scenario I can't use Master/Slave database
            > clustering, because only one master would be
            > writeable for my entity beans. And because I can't
            > configure the beans using another DB for writing than
            > for reading I need another solution.
            > That's why I need synchronous Master/Master database
            > clustering. Synchronous would be ideal because I
            > don't have any problems with lost updates or anything
            > other.
            >
            > Because my cluster is an academical one I'll have to
            > use a free database system. Oracle would be fine, but
            > it is a little bit too expensive :-)
            > So what are the alternative solutions?
            >
            > MySQL: Only supports Master/Slave
            > PostgreSQL: Only supports Master/Slave, but
            > there are some tools in development, supporting syn.
            > Master/Master
            > SAPDB: Seems to be a Master/Slave solution,
            > too
            >
            > Do you know a free database that supports synchronous
            > Master/Master replication?
            > I have found no message in this forum saying: I use
            > XYZ-DB. That's why I think this could be a nice
            > discussion (and that's why I have started a new
            > thread)!
            >
            > Cheers,
            > Markus

            • 3. Re: Your ideal database for clustering?
              slaboure

              It depends what you mean by "clustering entity beans".

              JBoss will not cluster the *state* of the entity beans: the state is managed by the database, not by JBoss. It is exactly the same for Weblogic, Websphere, etc.

              It is a DB-thing, not an AS-thing.

              Cheers,


              sacha

              • 4. Re: Your ideal database for clustering?
                belaban

                We are working on such a thing in the Cache/JBoss project. However, we don't replicate at the database level, but instead put a replicated cache in front of the EJB-CMP interceptor. This way, all requests will be replicated in-memory first, then persisted into the database. With a shared-DB scenario, only 1 node writes to the DB, whereas with local DBs every nodes writes to the DB.

                If you want DB-replication, I implemented asynchronous replication for HSQLDB (HyperSonic) half a year ago. You may want to look at that code. It should not be too difficult to switch to a synchronous replication scheme (it's actually on my todo list). Note that this is not for production systems (but I think it would be ideal for research).

                Bela

                • 5. Re: Your ideal database for clustering?
                  markuspr

                  Hi Bela,

                  thanks for your help! I've downloaded HSQLDB/R and it seems to work :-)
                  Because that's "only" a student thesis I hope that I'll don't have to change it to synchronous replication.
                  Do you know approximately, when you will implement synchronous replication? It's just for info!

                  Greetings,
                  Markus

                  • 6. Re: Your ideal database for clustering?
                    belaban

                    The thing is that I modified HSQLDB code, because they didn't have the hooks I needed to get replication going.

                    So if I wanted synchronous replication I would have to go back, get the latest HSQLDB and apply those changes again.

                    I therefore decided I'd rather wait until they provide the hooks (this is work in progress) and then I can simply plug in my replication module *without changes to HSQLDB core code*.

                    So, for now it is up to the HSQLDB team - you may want to follow up with them on their SourceForge fora.
                    Cheers,

                    Bela