4 ms·
Is Node.js Dying?
- JMTQp8lwXL 6y agoIt's tough to be certain about anything, but I could see a future where URL-syntax imports are absorbed by node. Whether or not Deno becomes a true successor to Node will be predicated on businesses seeing a painful problem (security) being solved by Deno. In a world with Docker, encapsulating a node process to a limited file system seems like an acceptable enough of a solution today (note: I am not a DevOps person, there likely is more nuance here)-- it's challenging to assess if the benefits of Deno outweigh the pain of migration. Regardless of the outcome, all efforts to improve the server-side JavaScript space are appreciated.
- js4ever 6y agoUrl import is already there https://www.npmjs.com/package/require-from-url https://www.npmjs.com/package/require-from-url
- JMTQp8lwXL 6y agoThanks for sharing --that is awesome the functionality exists-- but I meant native support by the require command.
- thu2111 6y agoBear in mind Deno isn't the only competitor. GraalJS can run all NPM modules on top of the JVM, in fact it supports both "pure" running JS on top of the JVM and also provides a mode in which it replaces V8 in the original Node binary, for extra compatibility with e.g. native extensions. This gives you at least three major tech wins: 1. Interop with the entire Java ecosystem and also as other Graal languages improve, with them too (e.g. Graal's Ruby support is pretty great, Python is maturing) 2. Extremely efficient and scalable pauseless garbage collectors. 3. Ability to do shared-memory multi-threading by sharing Java objects between workers. And soon via Project Loom there'll be very light weight fibers too i.e. you can write your code in a fully blocking style, no promises or async/await, but it'll be just as efficient as Node. It can load sources from URLs too (see https://github.com/graalvm/graaljs/blob/master/docs/user/JavaScriptCompatibility.md https://github.com/graalvm/graaljs/blob/master/docs/user/Jav...) It feels like Deno has focused on adding JS-specific features, and sandboxing is an admirable goal. Obviously GraalVM can do that too as long as you're in pure JVM mode, and aren't installing native/C++ Node extensions. So it may well be that Deno is more attractive to pure-JS hackers. But for people who need or want to bridge ecosystems, or scale a single JS program up to much larger heaps and higher performance programs, GraalJS is a serious competitor. Probably Node people don't take it too seriously because it's sort of outside their social circles.
- BossingAround 6y agoNo. Saved you a click.
- NathanKP 6y agoDeno is highly unlikely to replace Node. Instead it will just inspire some forward improvements in Node just like the node.js / io.js fork did back in 2014. io.js was separate from Node for a while, had a few core passionate fans, but didn't really see widespread adoption. It inspired node.js maintainers to do better though and eventually the two projects merged together and Node became better for it. JS itself has been around for 24 years now and has gradually evolved over the years with new keywords and functionalities to keep up with the times. Node has done the same, and can easily adopt many of the things that Deno has.
- http-teapot 6y agoIf Deno could run popular node libraries as-is then it’d be an easy sell but imo, except for security, the issues it solves doesn’t outweigh the cost of migration, if possible at all.
- NathanKP 6y agoRight. If io.js couldn't become popular enough to fully replace node.js even with backwards cross compatibility with existing NPM packages then Deno is an even harder sell.
- 29athrowaway 6y agoThe difference is that io.js started as a fork, and Deno starts with the premise that node has many fundamental design flaws that can only be fixed with a rewrite. Perhaps some of the solutions in Deno can be ported to node, but others certainly can't. For example, there's so much dependency on node-gyp that it's unlikely it will ever go away. By porting Deno's features to node you will be introducing so many backward compatibility issues and friction that it will be the same as porting your libraries and applications to Deno.
- kasra_mp 6y agoI agree, Deno at least won't take off for a couple of years. Many libraries are missing and companies are not that willing to rewrite their apps again. Unless the community abandons Node suddenly, it will be around but its market share will decline surely. If they can borrow some Deno features then the chance of Node dying will be very slim. Two that I find extremely useful are: url import and security. On the hand, if on Deno side they build a compatibility layer with NPM, then it becomes the market de-facto.
- bdcravens 6y agoBetteridge's law of headlines
- breatheoften 6y agoI think Deno will eventually replace node in mindshare and deployment numbers. What percentage of nodejs packages run on both node and the browser and do you expect that number to go up or down over time? If it goes up -- the percentage of node packages that run on deno also goes up. Code that runs in the browser is very valuable because it is an incredibly widely deployed user eyeball platform ... the browser _is_ the center of the javascript ecosystem -- and so there is already built-in pressure to migrate from node to deno -- especially if/when deno's browser matching api implementations become part of the compatibility testing matrix for a major browser vendor (like chrome or firefox) ... Deno will surf uphill on the ever rising value of browser compatibility until projects are actively weeding out any dependencies which "run only on node". Even given the huge dependency graphs of node applications -- you don't really have to replace that many high level dependencies before you've migrated yourself to deno ... -- and you will experience incremental benefit for partial steps along the way as you do ...
- bryan_w 6y agoOh no, HN is turning into slashdot
- jagannathtech 6y agois 'is node.js dying?' the new 'is php dying?' ?