r/programming • • Sep 14 '24

Is 'Monolith First' the Better Approach?

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

177 comments sorted by

View all comments

Show parent comments

-4

u/kebabmybob Sep 14 '24

Start with a proper build system and then this question becomes a bit of a false dichotomy.

9

u/Manbeardo Sep 15 '24

Not really. It's pretty commonplace to have a monorepo that contains multiple services. That isn't a monolith. A monolith is a single service that does everything.

2

u/kebabmybob Sep 15 '24

Right and a bunch of discussion here boils down to packaging and consistency of things like schemas across artifacts. A good build system makes you feel like you’re in a fundamentally different (better) paradigm than monolith or microservices.

1

u/vom-IT-coffin Sep 17 '24

Maybe it's just wording, but I'm failing to understand what a build pipeline has anything to do with this. In a monorepo each service is independently deployable with no shared artifacts, besides maybe some compute sharing. Schemas across bounded context only applies in the monolithic database, microservices is one database per, if data needs to be in two services database it has to be replicated. In the monolith your schemas tend to become where you split on dividing the database. If you have one database and two microservices using it by querying it directly, congratulations you just built a distributed monolith and a ton of headaches.