At work, we have several applications with databases in a centralized SQL server. Whenever one application needs to work with data from another application, it just queries it or updates it through the database. I believe this is the “Shared Database” pattern as described in the Enterprise Integration Patterns book (Hohpe & Woolf).
These cross database dependencies are causing us many, many headaches. The largest of these right now is that we’re running into performance issues on the SQL server, and can’t scale out because of the cross-database dependencies. I think what we should do is move away from the Shared Database pattern towards a messaging system as described in the EIP book. Each application would be responsible for all of it’s own data, and other apps that want to access that data would get it through services (on a messaging bus?).
- Where do we start refactoring towards the messaging pattern?
- Do we start by refactoring one of the applications to manage its own application database?
- Then what about the other applications are currently integrated with that one through the database?
- Is this the best way to decouple our database dependencies or should we be starting somewhere else?