incubator-openmeetings-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: OpenJPA Clustering (and MySQL Replication)
Date Tue, 15 Jan 2013 14:29:52 GMT
Hi Sebastian,
How are your primary keys defined?  I'm assuming some type of auto
generation -- table, sequence, or identity.  If I remember right, MySQL
supports Identity id generation.  In that case, I would let MySQL determine
the synchronization across the clusters for the primary key generation.

Good luck,
Kevin

On Mon, Jan 14, 2013 at 6:04 PM, seba.wagner@gmail.com <
seba.wagner@gmail.com> wrote:

> I think I found what I was searching for:
>
> http://openjpa.apache.org/builds/2.2.1/apache-openjpa/docs/ref_guide_event.html#ref_guide_event_conf_tcp
>
> The RemoteCommitProvider must be set up and notify the other instances to
> have a cache synchronization.
>
> I am not sure about the primary key issue yet, I guess there must be some
> kind of solution to let the database-cluster manage the sequences/pk's, so
> that multiple instances can write to the same database-cluster at once
> without primary key duplication/constraint errors.
>
> Thanks
> Sebastian
>
>
> 2013/1/15 seba.wagner@gmail.com <seba.wagner@gmail.com>
>
> > Hi,
> >
> > we are currently drafting/implementing some clustering mechanisms for
> > Apache OpenMeetings.
> >
> > I have seen OpenJPA supports the MySQL Replication feature:
> >
> >
> http://people.apache.org/~mikedd/nightly.builds/apache-openjpa-2.3.0-SNAPSHOT/docs/docbook/manual/ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_mysql
> > which is great!
> >
> > However it solves only one side of the cluster: Having the database
> > clustered.
> >
> > What happens if you want to cluster OpenJPA itself on multiple nodes?
> Each
> > OpenJPA instance would have its own data-cache, how can you make sure
> those
> > caches are synchronized across all nodes in your cluster?
> > And how would you solve the primary key/sequencer issue? When multiple
> > instances write to the same database they could potentially try to
> create a
> > record with the same primary key.
> >
> > Thanks!
> > Sebastian
> >
> > --
> > Sebastian Wagner
> > https://twitter.com/#!/dead_lock
> > http://www.webbase-design.de
> > http://www.wagner-sebastian.com
> > seba.wagner@gmail.com
> >
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message