2 ms·
> IO should be a dumb layer as much as possible. It should be Extremely general and as simple as fetching and requesting in the stupidest way possible. Then eve
by bcrosby95 2y ago
> IO should be a dumb layer as much as possible. It should be Extremely general and as simple as fetching and requesting in the stupidest way possible. Then everything else should be covered by unit tests while IO is fundamentally not unit testable.
Another way to put this is to ignore all the cool problems your database can solve for you and hand roll it instead. This also is a recipe for riddling your codebase with data races.
You're trading fairly easy problems for very hard problems. No thanks.
When running tests, optimize your database configuration for running tests against it, and make it possible to run those tests in parallel.
- AndyNemmity 2y agoRight, but you can see how they do it. The problems they are trading are likely not hard for them. Whatever you use, in your personal toolbox changes the results of the tradeoffs.