Re:Scala vs. Node.js as a RESTful back end server (2015)
by qihqi on Saturday April 23, 2016 @09:31PM
(#11558199)
Generally true. Though, in context of webapps, each thread usually works on one request. If your threads share (mutable) states in that case then something is VERY broken.
Re:Scala vs. Node.js as a RESTful back end server (2015)
by daxfohl on Sunday April 24, 2016 @08:45AM
(#11559491)
Kind of, but consider logging. In node you can just console.log. In JVM you have to use a multi threaded logging library or your logs could be jumbled. Lots of things like that.
Re:Scala vs. Node.js as a RESTful back end server (2015)
by sievebrain on Sunday April 24, 2016 @06:24AM
(#11559194)
Those aren't the only ways to write thread safe code, just the oldest ways.
Also, remember that you can have unexpected re-entrancy at any callback boundary in the fully async model. It is not a panacea.
Going multi-threaded and dealing with semaphores and mutexes also makes coding and debugging more difficult. It's all about trade-offs.