Monitoring MySQL database with Java application

5

I have a Java desktop application w / DB MySQL running on 100 company branches for over 6 years. Today at the head office we need some information from the branch database. I'm developing a web service Rest, to perform this integration.

The first time this integration happens, the desktop application will send all the records from 3 different tables (on average it will be somewhere around 3000 records per branch). I'm still checking the best way to perform this bulk insert so transactions do not get so heavy.

After that, only once a day will the branches send to the WS only the new changes and new records of these 3 tables.

I would like to know if there is a way to perform such a monitoring, when any change in the database happens, 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 I log in to the desktop application, send this file to the WS to consume and then delete this file?

I'm a little lost, searching a lot and I have not found anything yet that is a better option for this case of mine.

Thanks guys

  

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

  

I'm running some tests, still on same network, and picking up others   to simulate as if it were branches of the company, of course still   this is far from the real scenario, but just to get an idea. In addition to JMeter,   is there any other technology to perform these types of tests?

    
asked by anonymous 05.08.2015 / 00:38

1 answer

4

If your goal is to receive data from multiple banks and store them in a central database, I suggest you use a feature of MySQL itself, the Multi-Source Replication .

As indicated in this site , a MySQL database can now become slave of several masters :

Theyprovidesometutorials here .

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

    
05.08.2015 / 06:12