Hacker News new | ask | show | jobs
by artpepper 3757 days ago
Even in a microservice I'd expect DI to be useful for injecting stuff like logging, caching, data backend. For mocking, if nothing else.

DI + properly defined interfaces shouldn't make code harder to reason about.

1 comments

I would even expect some out of the box management APIs to help upgrade the microservice with low to zero downtime, feature toggles, etc... A lot of these get built into each app typically but when you're creating many different microservices, the overhead of creating a service needs to be as close to zero as possible.