Re:Why Segment Went Back to a Monolith
by eweise on Wednesday April 29, 2020 @02:26PM
(#23022470)
Starting with a monolith could lead to really difficult refactorings unless you structure the code in a way that it can be easily decoupled.
[ Parent
| on HN ]
Re:Why Segment Went Back to a Monolith
by JamesBarney on Wednesday April 29, 2020 @03:18PM
(#23023008)
Monolith -> microservices : difficult refactoring
Microservices -> monolith : difficult refactoring
Microservices with poorly chosen context boundaries -> microservices with well chosen context boundaries: very difficult refactoring.
"Monolith -> microservices : difficult refactoring" I guess my point is that it doesn't have to be complicated if you architect the monolith carefully. That usually doesn't happen though because frameworks don't necessarily promote the practice and projects are short sighted.
Re:Why Segment Went Back to a Monolith
by JamesBarney on Wednesday April 29, 2020 @03:45PM
(#23023328)
It's also really hard. Trying to determine how to split up any code base into logical divisions such that you when adding the next 5 years of functionality you'll have the fewest number of cross division processes is hard.
This is why Martin Fowler recommends starting with a monolith and refactoring into microservices unless you have extensive experience building out very similar applications in the same domain.
I once worked in a monolith that was structured in a way that it could have been easily decoupled. It never was because the codebase was so modular and well-tested that the only time we ever felt the need was when trying to assign ownership to runtime exceptions.
https://gocardless.com/blog/getting-started-with-coach/ was the framework.
Re:Why Segment Went Back to a Monolith
by mikepurvis on Wednesday April 29, 2020 @02:56PM
(#23022773)
Exception triage often requires examining the stack regardless— even if you have multiple processes, you're still going to have errors bubbling up from your pool of shared library code.
Re:Why Segment Went Back to a Monolith
by stcredzero on Wednesday April 29, 2020 @02:49PM
(#23022714)
Law of Demeter!
That idea had a lot of influence from Smalltalk, where the natural way of developing was in a monolith. So tactics like that which are about decoupling by default were a good idea in that context.
The same argument can be made for building separate services too. Could become very difficult to merge data between two services after you had redundant information being saved across the two because of a bad design up-front.