back to article Tired: Java. Desired: Node.js. Retired: The suggestion a JavaScript runtime is bonkers

As the Node Summit got underway in San Francisco on Wednesday, Charles Beeler, general partner at Rally Ventures, said the Node community has come a long way since 2012, when everyone was talking about Node.js and no one was using it. Initially released in 2009, the JavaScript runtime environment now has enough users and …

  1. find users who cut cat tail

    While code that will be still in use 30 years from now is being patiently written in something like FORTRAN -- as it was 30 years ago...

    1. Frederic Bloggs

      I wonder what node.js is written in?

      Just askin...

      1. Anonymous Coward
        Anonymous Coward

        Re: I wonder what node.js is written in?

        Believe it or not, it's written in Javascript.


        1. Notas Badoff

          Re: I wonder what node.js is written in?

          With C++ as needed to interface to OS platforms and the Javascript platform (V8, Chakra) (as Ben Noordhuis mentioned below is forced to do). The Javascript platform host is a huge part of Node.js. Oh yes, parts of Chrome and I believe V8 are also in Javascript.

          Using the hosted language internally is appropriate when the highest priority interface is between the application code and the library code. Saves a bit of marshalling data back and forth when the data traffic is heaviest on the application side of the runtime library. Depends on which APIs.

          I don't understand why 'snark' is valued above understanding.

    2. Captain DaFt

      While code that will be still in use 30 years from now is being patiently written in something like FORTRAN -- as it was 30 years ago...

      You sure you didn't mean COBOL? ☺

      (That PITA has more lives than Jason!)

  2. hord

    I don't get it.

    Node.js is an event engine with CPAN built-in. Yes it's handy. I don't understand why it's a skill on a CV and experience in other event engines doesn't count. What's special about JavaScript's event loop? Does it go to NaN twice?

    1. Notas Badoff

      Re: I don't get it.

      Nothing special about Node.js event loop. 30+ years ago the same thing was called "cooperative multi-tasking" and was similarly disparaged by purists, etc. If you know people that think it is new and different, laugh at them on my behalf.

      You're missing the attraction. The same language available on both sides of world-spanning conversations. If you've got developers willing to put up with this one particular language (*every* language has its distractions and detractors) they can work on the entire stack. You know, let's just get to work. Some companies appreciate fewer distractions, okay?

      Node.js is simply Javascript made available outside of browsers, nicely, fast and usable. That the ecosystem grown around it rivals CPAN, etc. is very much of equal importance to evaluators. More of the value of a language is in its ecosystem (libraries, tools, community, documentation) than in the language itself. If the mood of that community matches your down-to-earth sensibilities, all to the better.

      I like the ecosystem, especially the community. That makes the language not so much a consideration for me.

      And the event loop is one minor detail of Node.js. Ben Noordhuis and friends (thank you!) have made it work across multiple platforms. The implementation is a minor miracle, the idea is not.

      1. Destroy All Monsters Silver badge

        Into the tarpit!

        cooperative multithreading was similarly disparaged by purists

        Well, those purists noticed that one deep-stack call or one long-running or even never-returning function would mess your system up badly. This low-budget approach was thus rightfully thrown into the river.

        OS got processes and even threads which were scheduled by the CPU, so every code could play in its garden, safely. The world breathed in relief.

        Now we are back where we started because someone made the decision to throw away task switching and replace it with the illusion of optimizing aways context switching overhead. Of course context switching overhead does not magically go away at all, you have just moved it from the OS to your runtime like a first-semester student.

        As Vagg described, Node developed out of creator Ryan Dahl's observation that most programming is biased toward blocking-style code, where operations happen in a linear order. Node favors non-blocking, asynchronous programming, which turns out to be a much better way to deal with data that may or may not be immediately available when requested. Blocking code stops while it waits for data; non-blocking code can deal with other tasks.

        Protip: "stops while it waits for data" means the CPU is given to other tasks in a thread/process-oriented way, "non-blocking code can deal with other tasks" means you have to do the context switch yourself and schlep the mess of the callback handler around too. Enjoy not using an OS for what it is meant for.

        "Asynchronous programming is much more like we interact with the world," said Vagg.

        Are these people just completely confused or are they actually so intelligent that they are just dumb again?

        "Node.js is emerging as a universal development framework for digital transformation with a broad diversity of applications"

        It's not unlike a bog then. I wonder how many billions went down the drain in this particularly horrible IT fad driven by Google and other more-money-than-sense outfits? The fact that "developers" are ready to use this language for a "diversity of applications" also speaks volumes about the commen sense levels in this "industry". It's like digging one's own grave in the swamp of technical debt.

        1. lleres

          Re: Into the tarpit!

          Pray tell, how well does blocking multi-threaded code handle a large number of network connections?

          When everything needs to run in a (hardware) thread to gain parallelism, and all the application is doing is waiting on a socket, suddenly the overhead from all those context switches is greater than overhead spent actually doing something with that data.

          That is where event loops come in. Different tools for different tasks. Both have their uses.

          The real low point of node.js is that it forces _everything_ to be async, even when it really needs access to the CPU because it, like, needs to run some code on it, like, programming and stuff. Go and Python with native libraries like gevent are much better in that regard.

          node.js callbacks are still the epitome of sh1t-ness, though. Why bother putting in language semantics to handle async calls when you can just dump it all in the programmers lap and force them to pass around endless callback references for their handling code..

          References: Google nginx vs apache or any other multi-threaded vs event loop networking call handling benchmarks.

    2. John Sanders

      Re: I don't get it.

      I do, what sounds better on an industry driven by buzzwords and marketing nonsense?

      A) Event driven system with built-in CPAN

      B) Node.js

      Event driven what?

  3. Anonymous Coward
    Anonymous Coward

    Truly, it is the Sinclair BASIC for the Internet age.

    1. Dan 55 Silver badge

      Sinclair BASIC had better types.

      1. CrazyOldCatMan Silver badge

        Sinclair BASIC had better types.

        And didn't auto-break itself at regular intervals when some dependency deep in the worm-can of code got broken..

  4. Anonymous Coward
    Anonymous Coward

    "Node.js is emerging as a universal development framework for digital transformation with a broad diversity of applications"

    Bullshit bingo in the first quote. Node is firmly over the hill.

    1. Brewster's Angle Grinder Silver badge

      Yeah, all the cool kids are back writing C++ using WebAssembly.

  5. Oleg Mazurov

    Asynchronous is good, but...

    > Node favors non-blocking, asynchronous programming, ...

    And does it favor parallel programming as well? No? Then, when kids get older they'll come back to Mama Java (or want to marry someone like her).

  6. Deltics

    "Moderately Capable"

    ... is the target state that got us where we are today.

    Today... when you need a machine with 4GB of RAM, a multi-GHz, multi core processor and enough storage space to hold dozens of copies of the entire Encyclopaedia Britannica just to do your domestic finances in a spreadsheet.

  7. Anonymous Coward
    Anonymous Coward


    Go is the natural replacement for

    Typed, compiled, proper integers, multi-threaded, kawaii mascot. Yes it has disadvantages, just none relative to node.js

    1. Adam 52 Silver badge

      Re: Go

      Fully agree.

      The trouble is node.js developers (who mostly evolved from client side JavaScript bodgers) don't want any of that stuff - they like writing quick and dirty code without having to worry about it actually working reliably.

      1. Solarflare

        Re: Go

        I quite like Go. Easy enough to understand, quite flexible etc. The biggest downside is how it handles errors...

        1. CrazyOldCatMan Silver badge

          Re: Go

          I quite like Go. Easy enough to understand, quite flexible etc. The biggest downside is how it handles errors...

          And it's a bummer to have to move all those little stones to get the desired result.

  8. AMBxx Silver badge

    8 million Node.js instances online at the moment

    Is it just me, or is that a trivial number?

  9. minnsey231

    Made me smile to see VB.NET rise above JavaScript in the latest survey

  10. JLV Silver badge

    Saner JS kinda requires Node


    I am not sure I'd shoot for a whole dev stack in JS. JS is actually fairly elegant, and I much prefer it to Java's pomposity and limited capabilities - not being able to pass functions as variables, hello, 1960 called.

    But JS's also one language where I feel like conceding the point to the compiler fan club that compilers "solve your problems". They don't, but JS has gone too far in the opposite direction, that of never failing. For example, it'd be nice, when you import a mistyped inexistent member from another module, that it would throw an exception at that point. Not JS, no. Let's leave you to hunt that bug for a few hours. You could mitigate that somewhat with unit tests, but js unittest frameworks suffer from being too many and also front end code needs to run in browsers which complicates things.

    Back to Node. Thing is, whatever your backend is written in (Django here) if you want to deploy cleaner browser JS, using basic building blocks found in other languages like module imports and normal classes, you have to translate from JS 6 (or Typescript) down to JS 5 which doesn't have them. And that's where Node.js is needed, to host something like Webpack+Babel to transpile your code on the server side into the JS all browsers understand. It works, surprisingly well and can provide additional services like linting

    Vue.js, an awesomely simple, fast, and capable JS front end framework, let's me be way more productive and solid than just HTML 5 and plain js. Night and day. It's a super elegant system that makes the like of Swing seem like something a committee of French philosophers and anal retentive Soviet bureaucrats would design while on a vodka tasting tour. Blows away Python GUI toolkits, which traditionally have been one of Python's weak points.

    But its full power requires JS 6 and so do many of its more popular brethren like Angular and React.

    Hence... Node.js, like it or not. You're still stuck with JS's infuriating inability to fail early and reasonably, but much better overall.

  11. Kevin McMurtrie Silver badge

    Should you own only a crowbar or only a hammer?

    Anyone who wants to write a large system in one language is bonkers.

  12. Karlis 1

    > Consider a remark by Rod Vagg, chief Node officer at NodeSource, about the advantages of npm, the Node Package Manager. "Having come from Java, it's a breath of fresh air," he said.

    Advantages compared to what? Is he on crack? Maybe needs to be subject to MHA section 3? What about the times trivial things have broken half the internet?

  13. Anonymous Coward
    Anonymous Coward

    Java still on top

    Sorry Java still rules the land folks.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019