4 ms·
I particularly don't find the problem it solves appealing. The power of Node comes specifically from its everything async programming model, Javascript is just
by thalesmello 10y ago
I particularly don't find the problem it solves appealing. The power of Node comes specifically from its everything async programming model, Javascript is just a detail.
So what's the point in taking away the good part, and keep the cumbersome one? If you just want to program a Synchronous server in the JVM,just stick to Java.
- deleted 10y ago[deleted]
- _pmf_ 10y ago> If you just want to program a Synchronous server in the JVM,just stick to Java. And if you want to program an asynchronous server on the JVM in Java, all of the major and minor servers also support an asynchronous model (you merely lose the ability to program against the Servlet API, which pre-3 was bound to threads). There's no reason at all to bring JS in for asynchronous behavior.
- sourcesmith 10y agoThere is also Vert.x which runs on the JVM but is event driven and asynchronous (as well as providing a reactive API) and supports JavaScript (http://vertx.io/docs/vertx-core/js/ http://vertx.io/docs/vertx-core/js/) as one of its languages.
- amelius 10y ago> The power of Node comes specifically from its everything async programming model, Javascript is just a detail. I don't agree. The power of Node comes from being able to run the same code on the browser and the server (without transpiling performance penalties).
- cel1ne 10y agoI hope you don't mean the JVM by "the cumbersome part". It think is unparalleled in performance, garbage-collection, general dev-ops and monitoring capabilities. You can run many different languages on it, all nicely contained within the virtual machine. As far as I know Twitter replaced their Ruby/Rails with Code on top of the JVM for these reasons. Also I don't think it's good to religiously stick to async/"just one thread" and sync/"one thread for everything". The most performant answer depends on the real world scenario and almost always lies somewhere in between.
- boggydepot 10y agoI think he meant the js not java. Question about node js, So async model is the good part, js is the bad part, why use js then?
- my123 10y agoThe JVM is nowhere near as flexible as the CLR.
- cel1ne 10y agoThe JVM probably lags behind in some aspects. But it's ecosystem is way larger and not biased towards Windows.
- peterashford 10y agoIn what way?
- my123 10y agoThe CLR can be used to run C++ code compiled with the C++/CLI (/clr:pure) setting of MSVC. Java apps can even run on the CLR because of IKVM (https://www.nuget.org/packages/IKVM https://www.nuget.org/packages/IKVM). Good luck at using pointers in Java.