2 ms·
The backing services factor doesn't mean that you should expect to be able to hot-swap database types. Rather, it means you should be able to "dependency injec
by hunterloftis 7y ago
The backing services factor doesn't mean that you should expect to be able to hot-swap database types.
Rather, it means you should be able to "dependency inject" a compatible database into your app. Say your app is designed to speak Postgres - that Postgres db should be able to run locally, or on a managed cloud service, and the app shouldn't know or care which. You should be able to switch between such services without any code changes.
In practice, this sometimes does mean that multiple database implementations satisfy the interface expected by your app, and you can in fact hot-swap underlying stores. But the spirit of the factor is that the app should have its dependencies ("backing services") provided, rather than hard-coded.
- Dowwie 7y agoAh, that makes sense. Thanks for clarifying