3 ms·
How does this work with database replication? Does all “application logic” have to execute on the master database?
by corytheboyd 6y ago
How does this work with database replication? Does all “application logic” have to execute on the master database?
- kemiller2002 6y agoNot necessarily. You can make it so that cross replicated databases can function independently and then sync the data together. This of course assumes that you don't have something like an ordering system and you absolutely need to make sure that you don't sell more than your inventory.
- corytheboyd 6y agoThat makes sense, yeah. I admittedly haven’t studied the pieces of the stack, but maybe something like PostgREST allows routing certain requests to master vs any replica, where you could make the atomic transactions needed for inventory based updates. This is all completely outside the realm of things I’ll ever get into haha. IMO so what if the current app/db server boundary is “slow” or “adds too many moving parts” I already spent my entire career learning it, there is value in that to me.