3

I'm currently working on a project consisting of two different web applications. One of the applications is a PHP web server with a website front-end and a MySQL database. It consists of Laravel framework and uses Eloquent ORM to make transactions on the database.

The other web application is a Java back-end server that is used for handling requests between the website and other web services. This application also has its own MySQL database and uses Hibernate for database transactions.

These two services have data that need to be synchronized between them and I'm trying to decide on the best approach. I am currently considering two options.

  1. Use a web service to send data between the applications and update the databases through the applications. The back-end server already has a RESTlet service and is what is being used to receive commands from the website.
  2. Add a schema to the back-end that matches the tables on the website database and share the same tables between the two services. This option had occurred to me and was suggested by my colleagues who are also working on this project, but my better judgement tells me that this would be a bad idea. I feel like this would result in unforeseen problems and increase complications.

Thank you in advance for your suggestions. If there are other solutions or approaches that I have not considered, please let me know. I'm relatively new to working on projects of this scale.

2

2 is the Best option.

The only issue you have to worry about is load - One site can take down the other. I see no other downside.

Option 1 has much more breakage points. I can't imagine why you feel it may be less stable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.