3 ms·
Microservices make more sense in dynamically typed languages without a good module system because they turn into spaghetti mess after 20k lines. The worst giant
by throwaway189262 6y ago
Microservices make more sense in dynamically typed languages without a good module system because they turn into spaghetti mess after 20k lines. The worst giant spaghetti projects I've touched were PHP, Perl, and JS. If you can't put boundaries within your app you don't really have a choice but to put them at service level.
In Java (and similar) "enterprise" languages you have static typing, access modifiers, a quality module system. It's trivial to split your app into multiple independent units.
And the JVM + CLR are designed for giant monstrosities. They use a compact bytecode format, zip their dependencies, and do crazy things like runtime code unloading and in-memory string deduplication.
We have Java apps with millions of lines of cruft that run fine on reasonable machines. Totally anecdotal but our worst disasters are dynamically typed stuff like node where the only way to know what the objects being passed around look like is to see them in a debugger. And with JS the "module system" always devolves into webpack concatenating everything into one giant file. It's pretty gross