by mpfundstein · 8y ago · 0 comments
Regarding the discussion Micro-Service vs Monoliths. I agree that a monoliths gets you started quicker. But it also asks a lot of discipline from the programmers. E.g. 'stick to your domain boundaries', 'Don't take that shortcut of direct db access because business needed the feature yesterday', etc. Otherwise you'll have big troubles splitting it up later on. [2].
I REALLY REALLY REALLY like that micro-services make your boundaries explicit and enforce you to write contractual APIs aka Interfaces. Much more than all the promises of scalability etc.
[1] https://github.com/MarkusPfundstein/microservice-service-dis... [2] https://martinfowler.com/bliki/MonolithFirst.html
I am still coming back to projects sometimes where I didn't do this and I hate every minute hacking on them -.- 'Wish I would have just used React or whatever' are often my thoughts then :-)
From what you just said they're running for, at most, a few thousand people.
In terms of loads/numbers/etc. that's child's play and definitely not "huge applications". The kind of decisions he's talking about are for things with thousands of concurrent users per second, not per day.
That kind of stuff could be dealt with a single desktop computer running PHP and mysql. And you definitely don't need microservices.
In my experience, having worked in both enterprise and consumer startups, enterprise is shallow but broad with little need for any of the complicated stuff and more need to make the code really simple, obvious and uncomplex because it ends up dealing with so many different problems, while consumer scale is where you start needing to get a bit fancy purely because of scale, but it only deals with a couple of problems.
With huge applications, I mean 10s of thousands of lines of code with features added on a daily basis by multiple developers.
What both have in common is that they started us as seemingly small 'throwaway tools' but grew into business scale applications that serve now a core purpose.
Btw, who said I didn't use MySQL and PHP ? :D