DEV Community

Discussion on: Microservices: when to choose it, how to migrate painlessly, & make it resilient

Collapse
 
jeastham1993 profile image
James Eastham

Interested to discuss, but I disagree slightly with your point of single project/single person teams still using monoliths.

I work for a small company and am the only full-time dev. We implement a lot of different software solutions for our clients, and since finding microservices it's become my de-facto way of developing.

Two reasons

  • The capability to be able to change a single service without worrying about everything else is completely invaluable with such a small team. Committing a change and it auto testing and rolling out to production saves valuable man hours
  • It gives us re-usable components that multiple clients can use

Agree with every other point wholeheartedly though :) I love your style of articles as well Arpit!

Collapse
 
mohanarpit profile image
Arpit Mohan • Edited

Thanks James! Glad you enjoy the articles.

While microservices are a useful construct, architecture patterns follow Conway's Law. Microservices pattern is no different. My sense is that, in your case, if you are the only full-time dev and are working with other folks (remotely, part-time, or on contract basis), microservices work better for you because of Conway's Law :D

It's useful to break down any application into smaller services that communicate with each other. But the management & communication overhead of each microservice starts to take over at an exponential rate. That's why, personally, I've always felt that monoliths with a good structuring of packages, libraries etc work better. Then, I'm only working on a single code-base which is easier to run & test locally without other dependencies involved.

Re-usable components for multiple clients could be published as libraries/npm packages. That way, you don't have to run it as a separate service communicating over TCP.

Collapse
 
jeastham1993 profile image
James Eastham

Agree on the fact that the management & communication overhead. There is a lot more to think about in terms of interactions between things, but I find it makes you much more conscious of the changes that are made to any service.

I also find it forces me into being more TDD. If I know a data model in API A is relied on by a Worker B then I'll write a test to ensure the correct properties are always returned.

Interesting point on the monolith with good package structuring though. Never really thought about that. It's almost strongly typed 'microservices' all running in the same executable.