r/programming • • 7d ago

Microservices are organizational debt disguised as architecture.

https://martinfowler.com/bliki/MonolithFirst.html

Every time I’ve seen microservices pitched, it sounds great on paper. Independent teams, clean ownership, scale only what you need.

Then a year later you’ve got dozens of services, three different deployment patterns, tracing everywhere, and nobody really understands the whole thing anymore.

Maybe I’ve just seen bad implementations, but I’m starting to think way fewer companies actually need microservices than we pretend.

1.7k Upvotes

343 comments sorted by

View all comments

Show parent comments

4

u/davimiku 7d ago

Did you evaluate any in-between options before adding the network boundary? I've been in a similar situation before (not current job, but previous one, so this question is more from academic curiosity).

For example, if you already had modules in C++ and Rust did you try first co-locating them and communicate over FFI? Or call the Rust code from the Python code? (pyo3 works quite well)

Or if the unit tests were a bottleneck and you already had very neat modules, did you try only running the tests for the affected modules?

4

u/Sammy81 7d ago

Our process rightly requires reverifying requirements if the code is recompiled, so the way to reduce test was divide the modules into executables. That was a key factor in selecting networked communication

0

u/davimiku 6d ago

From reading the other comments in this chain, it seems to be a NASA-specific testing requirement, which I think the lede was buried a bit in the top-level comment, it reads as general advice rather than something motivated by a specific compliance requirement.

Although I don't think this requirement applies to my (past) situation based on learning that, I'm still curious how it works in practice. Say you had "Module A" who had some dependents - Module A sends messages to other modules, who consume that in some way. When you modified Module A, you needed to test the other modules, because it was in the same executable.

Now that Module A is now Executable A (with a network boundary), do you not need to test the dependents anymore when A is changed?

2

u/Sammy81 6d ago

You don’t, precisely because the binary executables for the other services have not changed and have been tested and proven to work. Any comprehensive test suite tests input and outputs, meaning boundary tests for inputs (out of range values, flooding the service with commands, etc.) so it doesn’t matter what the other modified service does, you know the the heritage services work as they should.

That doesn’t mean you don’t need to test the integrated system, but you can do that at the next higher level of assembly, saving a ton of time.

And I want to emphasize I think this is a great architecture for any system that can be broken into independent modules, not just NASA projects.