this post was submitted on 09 Jul 2023
56 points (98.3% liked)
Programming
17398 readers
140 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
We only get this if we do microservices correctly. That's more or less the whole point of my comment. In many cases, teams rush into splitting their monolith into smaller chunks and call it a day. Without proper monitoring, orchestration/choreography, service boundaries, tooling, etc. microservices will drag a team into territories where they will lose control.
No, I don't believe that. However, I also don't believe people who write spaghetti code will start writing better code just because now they are writing smaller components. If the team has good coding hygiene, they will produce good code whether it's monolith or microservices. But you have a point. If we are talking about components that are 200LoC, it's more difficult to produce spaghetti (or easier to recover from it). I'm not sure that's the norm, though.
As a final note: I'm not saying microservices are bad, or monolith is better than microservices. I'm just trying to introduce some nuance. I have been part of a microservices transformation and I think it was successful. But we met with many challenges along the way that were not immediately obvious from the beginning. To quote one of the pioneers of microservices architecture:
I'm not sure what point you tried to argue then. I mean, is it a valid starting point to presume the hypothetical monolith is the cleanest software project possible but the same people, when peeling stuff off to another service, suddenly unlearn how to write and manage code?
It sounds like you're trying to use very weak strawmen to criticize offloading tasks to separate services.
For you to argue that, you first need to start from a point where your hypothetical monolith is a tangled mess of spaghetti code similar to the case you tried to pin on microservices. I'm not sure what would be the point of that.
Nevertheless, if you're arguing over spaghetti code, I'm sure you agree that smaller projects with smaller code bases are easier to untangle than large projects with large code bases. Once you acknowledge that fact, how exactly do you think that limiting the scope of a project wouldn't improve it's maintainability? Are we expected to believe that spaghetti code in large complex projects is as easy to maintain as spaghetti code that is a fraction of a size?
Sorry, I don't think that's remotely relevant to the discussion. This is about monoliths, and peeling other services out of them. In your example, it would be like dialing up from zero to one or two. Even the source in your quote argues against that, and their point is also not about it. Going too far in microservices does not mean "now the monolith calls a lambda".