Monitoring Mysql database c/ Java application

Asked

Viewed 446 times

5

I have a Java desktop c/DB Mysql application running in 100 company branches for more than 6 years. Today at headquarters we need some information from the branch database. I am developing a web service Rest, to carry out this integration.

The first time this integration happens, the desktop application will send all records from 3 different tables (on average it will be around 3000 records per branch). I’m still checking out the best way to carry out this Bulk Insert not to get so heavy transactions.

After that, only 1 time a day affiliates will send p/o WS only new changes and new records from these 3 tables.

I would like to know if there is a way to perform a monitoring of this type, when there is any change in the database, more specific these 3 tables?

Or if I should implement some routine so that everything that is inserted, changed or removed, I create a file in the application folder, and when logging into the desktop application, send that file p/WS consume and then delete this file?

I’m a little lost, doing a lot of research and I haven’t found anything yet that’s a better option for this case of mine.

Thank you guys


I’m researching now something like an audit system, I’ve been reading about Hibernate Envers and I’ve also been researching Broadcast. I’m analyzing and verifying if this could be a way to solve this particular case. Has anyone worked or knows these "possible" solutions?


I’m running some tests, still networked, and catching others to simulate as if they were subsidiaries of the company, of course still is far from the real scene, but only to get an idea. Besides the Jmeter, there is some other technology to perform these types of tests?

  • Guys I did a cool post about Hibernate Envers, there I teach how to customize the audit of actions of Hibernate and how to consume the data generated in these audit tables of the envers through java code.. It was very easy to understand, very nice and take this doubt your friend.. any doubts, I’m available!! http://www.redspark.io/utilizando-o-hibernate-envers-com-spring-mvc/

1 answer

4

If your goal is to receive data from multiple banks and store it in a central database, I suggest you use a Mysql resource, the Multi-source Replication.

As indicated in this website, a Mysql database can now become slave of several Masters:

Gráfico tirado de http://mysqlhighavailability.com/

They provide some tutorials here.

But on this website, everything seems much simpler! (This link I found here.)

  • Thanks Daniel I like these tutorials, I will study more about replication. The branches are using mysql 5.5, if I choose this choice, I will have to update all, then I will have a big problem, have branches all over Brazil, Cover, Northeast, South. And my idea was just to update the JAR of my application, with the methods p/ integration with the WS. Because simple changes, even guiding by phone, of the very problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.