We are a small team of 3 to 4 developers building a custom ERP for a few customers.
Our current system has basically become a big ball of mud.
Before I joined, there was already a complete rewrite with the goal of making things more modular, but over time it ended up in pretty much the same place:
- modules, but no real boundaries
- everything can access everything
- one database and one schema
- lots of foreign keys and relations across modules
- almost no events
- a huge common module where more and more shared stuff ended up
Now my boss wants to start from scratch again.
He recently came across Self Contained Systems (SCS) and thinks this could solve the problem.
The idea would be completely separated systems with their own:
- database
- deployment
- backend
- UI
Communication between systems would only happen through defined contracts.
I understand why he likes it. The boundaries are hard to break. A developer working on one SCS cannot simply access the database or internal code of another one.
My concern is that we are only 3 to 4 developers building a fairly traditional ERP. We don't really need independent scaling or independent deployment for organizational reasons.
I'm worried we could end up with a distributed big ball of mud, while also adding things like:
- network communication everywhere
- eventual consistency
- harder transactions
- retries and failure handling
- contract versioning
- more infrastructure
- harder debugging and local development
I would rather go with a modular monolith with strict boundaries.
One deployment, but properly separated domains/modules. No direct access to another module's internals, no cross module repositories, explicit contracts, events where they make sense, and possibly separate DB schemas to reinforce ownership.
We could also use in process events initially without introducing Kafka or another broker.
My boss's main argument is basically:
And I think he has a valid point. Our previous attempt clearly failed.
At the same time, I don't think the previous system ever had real or enforced module boundaries in the first place.
One problem for me personally is that I don't have a huge amount of architecture experience yet, especially with running microservices or SCS in production. I understand the theoretical downsides, but I lack the real world experience to confidently argue which of those downsides will actually matter for a small team like ours.
My boss has around 30 years of development experience, so I also don't want to argue against his approach just because I personally prefer another architecture.
What would you choose for a team and product like this?
Am I underestimating the advantages of SCS here?
Or are we introducing distributed system complexity mainly to enforce architectural discipline that could also be enforced inside a modular monolith?
I'm especially interested in experiences from people who have worked with both approaches in smaller teams.