Some Questions About Embedded SymmetricDS

I need to implement database synchronization in a Java application and I started using SymmetricDS, which is a mature tool and allows for synchronizing different DBMSs.

I've been playing around with SymmetricDS for a bit, but can't achieve my needs, so I have a few questions about this tool.

First I will talk about the context of the application:
I developed a desktop application written in Java (JavaFX 2.0 + H2 database + Hibernate), I am quite new to Java, but I managed to create an MVC architecture and finally finish the standalone version of my application.
Now I need to sync between multiple instances of an application installed on different computers.
I have a "main" MySQL database running on an external server that also runs SymmetricDS as the "main" engine.
Applications use H2 Database and ClientSymmetricEngine.
And I need to sync all data between clients.

I have managed to create a more or less functional system using SymmetricDS, but there are some anchor points:

  • Is there a way to simply implement the "last updated winnings" strategy instead of the default "last sync attempts"?

  • Is there more complete documentation or a step-by-step guide for implementing SymmetricDS in an existing application?

  • How can I extend the symmetry of pull and push jobs without using the Spring Framework (I need to freeze my application during sync)?

  • What happens if I clear the tables myself:
    DATA DATA_EVENT OUTGOING_BATCH INCOMING_BATCH DATA_GAP NODE_HOST_STATS NODE_HOST_CHANNEL_STATS NODE_HOST_JOB_STATS after every push / pull success? This table grows quickly after a few minutes, even if there is no change in sync, and it slows down my application.

thanks for reading.

JBRTRND

+3


source to share


1 answer


Is there a way to simply implement the "last updated winnings" strategy instead of the default "last sync attempts"?

Yes there is:

NEWER_WINS: Indicates that when a USE_TIMESTAMP or USE_VERSION conflict is detected, either the source or target will be defeated based on which side has a newer timestamp or a higher version number. The resolve_row_only column determines whether to ignore the entire batch or just a conflicting row.

You will need to use the conflict detection USE_TIMESTAMP or USE_VERSION and then the NEWER_WINS conflict resolution strategy.

Is there more complete documentation or a step-by-step guide for implementing SymmetricDS in an existing application?



No no. You will have to figure it out yourself or even better use a standalone server. Not only do you have to spend time integrating it into your application, but future updates will be trivial. Just download the new version and replace the old one.

How can I extend the symmetry of pull and push jobs without using the Spring Framework (I need to freeze my application during sync)?

SymmetricDS is written using Spring, so it will be quite difficult to extend using something else without a lot of rewriting. If you are using a standalone server then there is no need to extend it avoiding Spring.

What happens if I clear the tables myself: DATA DATA_EVENT OUTGOING_BATCH INCOMING_BATCH DATA_GAP NODE_HOST_STATS NODE_HOST_CHANNEL_STATS NODE_HOST_JOB_STATS after every successful push / pull? This table grows quickly after a few minutes even if there is no change in sync, and it slows down my application.

Don't clean it yourself, just reduce the cleanup work period and shorten the survival period for successfully synced code as described here: http://www.symmetricds.org/doc/3.6/user-guide/html-single/user-guide.html# purge-job

+4


source







All Articles