• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Synchronizing MySQL with FileSystem

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.




 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic