3 ms·
They don't. They just force less disciplined devs to incur less technical debt by making interfaces inviolable. Personally, it would take a lot for me to switc
by StavrosK 11y ago
They don't. They just force less disciplined devs to incur less technical debt by making interfaces inviolable.
Personally, it would take a lot for me to switch a part of my monolith to a microservice and lose the speed of having everything done in the same process and the guarantees that having a single relational database offers. Having to reconcile data that got off sync because it was in two different data stores is not fun for anyone, and, to me, it's not worth it just to force yourself to not call any private methods on the other service. I just expose a public ABI and say "to interact with this part of the application, you may only call these functions here".
- gt565k 11y agoYou can use the same data store with different services. If you have a web application that handles most of the traffic on your site, and you have some management task/process that hogs resources in the same application, you're affecting your end users by running those processes on the same service. The idea of microservices is to separate components so one does not affect the other, and you can scale individual components easily.
- StavrosK 11y agoDefine "application". You can easily have the task be a part of the same codebase and run on a different process or even server. For example, my Django maintenance commands run on a different server, and so do tasks, but they're still part of the same monolithic codebase.