• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Synchronizing MySQL with FileSystem

 
Sanjeev BhimaRao
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

I have two servlets managing list of items+categories in MySQL tables and files in the file system in two physical servers.
(Each physical server is a MySQL+Tomcat container).

The DB schema of mysql tables in the two servers in more or less the same with a few exceptions.
I am looking for the best way to handle synchronization between the two servers and reduce error handling code.

Failure can occur during the following activities.

Server 1 storing files
Server 2 storing files
Server 1 DB update/insert failure
Server 2 DB update/insert failure

DB records are dependent on files and vice versa.

Anyone with experience in such an deployment - kindly help me with your ideas.
I can provide further specific details if required.

Regards.




 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for the best way to handle synchronization between the two servers and reduce error handling code.

Are these two servers in a clustered environment? How are they relate to each other (specially from a given user's perspective)? How is your Application deployed & structured? Why two databases for an application?
DB records are dependent on files and vice versa.

How?
Are you using any transactions in the application currently?
 
Sanjeev BhimaRao
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for taking time to review my question.

The two servers represent two individual server clusters.

The DB records and files are related such that for each record in DB, there MUST exist a file.

Currently I am not using any transactions.

In summary, I am trying to design a protocol between two servers.
And due to lack of experience with beans, I am limited to using Servlet Container.

Regards,
Sanjeev
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In summary, I am trying to design a protocol between two servers

Solution would solely depends on what are the objective(s) of this protocol. And have you check the current technologies/protocols whether they suit your requirement?
And due to lack of experience with beans, I am limited to using Servlet Container.

If you meant EJBs then they are for the business tier of the application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic