0

I'm rewriting a legacy web application. At some point in time, I want old and new app, to work in parallel, on databases with different structure (both mysql). The troublesome part is that the databases needs to be synchronized, preferably in real time. So, if a new user is created in old app, I want him also in new one.

Have anyone struggled with similar issue? I'm thinking about some sort of middleware in between those two databases, that would 'translate' inserts and updates between schemas but maybe there is something else?

Cheers and thank you :)

Maarduk
  • 133
  • 6

1 Answers1

1

I think the only reasonable option is to abstract all database operations in your application in a way that they update both databases.

The database structure is often coupled with the business logic. Therefore if you implement a separate middleware, then that middleware might need to duplicate business logic from the application.

This increases possibility to create errors, when application business logic is updated and then the middleware is not updated.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63