3 ms·
Been there. We had a central DB that everyone relied on that also would allow ad-hoc queries from support staff. Locks were an issue and failed batch job would
by jabart 9y ago
Been there. We had a central DB that everyone relied on that also would allow ad-hoc queries from support staff. Locks were an issue and failed batch job would leave transaction open. The entire org had to use this database, no way around it and there was 10+ years of legacy code in various systems.
We took the simple approach, we had our own database server, so we had the DBAs setup a one-way replication of key tables we needed. We put stored procs and synonyms in front of those tables so in case they moved it wasn't a major expense to us, that also helped the DBAs feel better in case they needed to drop the replication. We also copied over any stored proc we needed to use, pointed them at our synonyms. This also helped to buffer any unintended consequences from an update to a stored proc. Average replication latency was 250ms, setup an alert to let us know if it went higher to let us tell the other teams they might start having issues.
The result, the entire company could be frozen from an open transaction on a key table, but our app could keep working. Effort level was low, results were amazing.
- 3pt14159 9y agoThat sounds really interesting! One question though: Did your app not need to propagate changes back to theirs? Like, say a customer moved from Canada to the USA and now you no longer needed to apply HST. How did you handle data going back the other way? Aren't you risking getting out of sync if the data is a two way propagation?
- jabart 9y agoWhen we did need to propagate changes back, we used a service by another team, if that team used queues, just a direct post, error to log. If they didn't, we put up a queue, and added it to our queue processor and tried their service for 3 days, logging each time to eventual dead letter our ops team could retry.
- bni 9y ago"so we had the DBAs setup a one-way replication of key tables we needed" What software did the replication? Something built into the DB or 3rd party?