4 ms·
Country codes, and other lookup tables, could easily be handled by a repository of config files. Or, if your company uses a single programming language, a libra
by kayodelycaon 4y ago
Country codes, and other lookup tables, could easily be handled by a repository of config files. Or, if your company uses a single programming language, a library.
One strategy I've used is to designate one system as a source of truth (usually an ERP system) and periodically query its database directly to reload a cache. Every system works off their own periodically refreshed cache. Ideally, having all the apps query a read replica would prevent mistakes from taking down the source of truth.
I haven't done this, but I think using Postgres with a combination of read-only foreign tables and materialized views could neatly solve this problem without writing any extra code.
I don't know how far this would scale. I do know that coordination and procedures for using/changing the source of truth will fall apart long before technical limitations.
- Pamar 4y agoFair enough. The catch, though is that ... I am the guy working on the ERP, in your example ¯\_(ツ)_/¯