I spent many years working on the JVM, working with Java and then later working with Clojure. I am used to that world and its culture. It is a world full of books and essays with interesting debates about key issues of software architecture. I'm now switching over to the world of NodeJS, but I can't find the books or essays written to the same depth of detail. I'd like some pointers.
Just to take one issue. How should exceptions be managed? There was a long debate, in the world of the JVM, about whether exceptions should be handled as locally as possible to the point of the error, or whether it was simpler and cleaner, from the point of view of architecture, to let most exceptions bubble up to the top and handle all of them in one place. I personally favored handling errors locally, but I learned a lot by reading both sides of the debate.
I'm having trouble finding conversations like that, regarding NodeJS. Has there been a debate about best practice? Where can I find it?
Also, performance tuning. I have the impression that NodeJS is a bit more magical than the JVM, therefore discussions of performance tuning are considered besides the point in the world of NodeJS. Whereas the JVM offers a thousand configuration options, NodeJS seems to offer fewer. Is that correct? Where are good resources on this subject?
Here is the thing about high level modern interpreted languages — most of the time YOU DON'T NEED all those infinite pointless debates around what practice is the best or how we design another AbstractInstanceBuilderFactoryStrategy class etc.
Most of the time NodeJS just works. THere is really almost nothing to discuss, unless you face some specific unique challenge.
You just write clean single threaded code, and it just works as expected. And usually just scales horizontally to a very high volumes of traffic.
And the cost of change and dev experience is sometimes infinitely better than in Java/Scala stack.
https://www.zdnet.com/article/how-replacing-java-with-javasc...
Hence, you don't overthink about 120 amazing classes and interfaces in advance — you can grow your design together with the requirements.
Regarding the bottlenecks — the only nodejs bottleneck is pure sync calculations, so just never block the thread with heavy algorithms and you're good to go.
I'm speaking of personal experience working on loaded Java and Nodejs artifacts. It's just different, much less overheaded, way of thinking about the task and about the world.