cancel
Showing results for 
Search instead for 
Did you mean: 

Working against two databases

tan-tan
Champ in-the-making
Champ in-the-making
Hi,
I'm evaluating Activiti as BPM engine.
My company has currently two data centers with full redundancy between them.
We're using mySql for our own server using master-master configuration, while the auto-incremented ids are skipped by ten, while one data-center creates new records with 10, 20, 30, etc. ids and the second data-center creates the ids with 11, 21, 31, etc., this way new records with the same id won't be created simultaneously in both data-centers.
I understand that in each data-center I can seamlessly run activiti-explorer on multiple machines against the same mySql server.
Can I do that with two databases that synchronized constantly between them in two different data-centers?
How can I overcome the id uniqueness issue if the id is created by the engine?
3 REPLIES 3

yvoswillens
Champ in-the-making
Champ in-the-making
Hi,

for this scenario you can use the UUID generator (as described here: http://www.activiti.org/userguide/#advanced.uuid.generator) .
This generator will create IDs based on time and the ethernet address of the machine.

Regards,

Yvo

tan-tan
Champ in-the-making
Champ in-the-making
Thank you.
Can you think of any other issue that could be raised by such architecture?
Do you know if someone tried it before?

jbarrez
Star Contributor
Star Contributor
I depends on how the database replication is configured. I can see scenarios where the data hasn't been synced yet and is needed on a certain node. But i don't know the details of your setup of course.

I have no knowledge of anyone else taking this approach.