Live data from Hacker News

I finally escaped Node

acco.io

131–140 of 181 posts

Re: I finally escaped Node

#131
post #20

From the title, I was expecting the article on something along the lines of how, where and why developers can move from Node.js. However the arguments are not so solid and there is no migration path. We all know Elixir is great but the adoption and maturity is low as compared to JS. Yes, Node is not perfect but (with TypeScript added) tell me a development platform that can run under 100 MB of memory, handle most req…

Compile a Java/Kotlin app with GraalVM and you can have <50mb app with 0 startup time which can outperform anything that node can do.

Re: I finally escaped Node

#132
post #131
post #20

From the title, I was expecting the article on something along the lines of how, where and why developers can move from Node.js. However the arguments are not so solid and there is no migration path. We all know Elixir is great but the adoption and maturity is low as compared to JS. Yes, Node is not perfect but (with TypeScript added) tell me a development platform that can run under 100 MB of memory, handle most req…

Compile a Java/Kotlin app with GraalVM and you can have <50mb app with 0 startup time which can outperform anything that node can do.

I benchmarked Node.js on V8 vs Node.js on GraalVM (Graal Node) and GraalVM performed worse due to floating point issues and used more memory.

Re: I finally escaped Node

#133
post #75

Earlier quoted context omitted.

Was the Java utility one that started and didn't run for very long, like a command line application? The JVM (at least the Oracle one) takes a long time to start up, so any application that runs on the JVM takes a long time to start up. The JVM is much better for long running processes.

A vendor gave us a .jar cli tool for managing an enterprise product last year, and I swear it starts up in under half a second (to the familiar spring boot splash too), so it is possible, just uncommon :)

Ah, my bad, my experience is old. Thanks for the correction. :)

Re: I finally escaped Node

#134
The author took way too many words to say message passing between processes is a more grokable form of concurrency than callbacks. Then goes on to say that Node is less grokable than Erlang because concurrency in Node heavily relies upon async/await which is just pretty callbacks. There are some weak analogies to the importance of data structures mixed in to the text which aren't helpful.

I think BOTH models of concurrency have their uses. The only problem I see is not being able to apply the appropriate one at the appropriate time because the language doesn't support it.

Re: I finally escaped Node

#135

Earlier quoted context omitted.

I don't know why green thread based languages do not export a pooling interface on their FFI. Pooling much nicer interface to implement than callbacks, and a quite easy concept to plug one interface into another.

I'm not sure I follow. Can you explain how two runtimes, each with its own green thread implementation, would interoperate in this manner to make a call across the boundary? Say, X (written in A) wants to asynchronously call Y (written in B) and wait on it, passing it Z (also written in A), which Y needs to call several times to perform its task.

X does not wait on Y. It starts the task, and adds the polling interface for the task into its internal polling list. When something is available, calls the continue interface of Y as many times as it needs, just as it does with the OS data polling.

The same happens for Y calling Z.

Re: I finally escaped Node

#136
post #20

From the title, I was expecting the article on something along the lines of how, where and why developers can move from Node.js. However the arguments are not so solid and there is no migration path. We all know Elixir is great but the adoption and maturity is low as compared to JS. Yes, Node is not perfect but (with TypeScript added) tell me a development platform that can run under 100 MB of memory, handle most req…

PHP by a mile.

It's performant. It has bad rep for its history. But every release makes it better. And it has a nice model of architecture where the whole app is setup and tear down with every request in most scenarios. Your whole app is a response object.

There are nice, mature frameworks like Symfony or Laravel that make it really pleasant to use.

Pair with FastCGI and nginx and you can have a real killer.

Re: I finally escaped Node

#137

Earlier quoted context omitted.

It's a one liner if you use Day.js. It's makes no sense to include this functionality in Node.

What makes the Date constructor a good candidate for the standard library but not the aforementioned methods? Not everyone knows about Day.js, you had to learn that at some point. Why Day.js instead of Moment or Luxon or Date-Fns? There's a lot of cognitive value to having a fully featured standard library.

That why we read and learn. You can't expect node to work like java. I feel like I'm talking to a wall with you guys. I've been working with JS for 15 years. I would never presume to start Java dev and expect to do things my way. I saw the same thing when Java devs were trying to learn Ruby... you have to approach with a different mentality.

Regarding Moment, on their site and they plaster exactly why you should not use moment and explain exactly why other libs (Day.js included) are better. Node is designed to be modular, Java isn't.

Re: I finally escaped Node

#138
post #19

We went away from node as a backend technology for a bunch of reasons. Here's a list of the biggest pain points: - Lack of a good standard API; compared to environments like Java, C# or Go, node's standard library is significantly sparse. - The tendency for small libraries/frameworks leads to a very high number of third party code with all the problems attached; bigger attack surface, licensing challenges, it's econo…

> Is node a bad technology?

You describe a lot of things that factually are signs of a bad technology.

Why languages have this "free pass" where it cost BILLONS in troubles but, "no, not exist bad languages"?

Re: I finally escaped Node

#139
post #97

Earlier quoted context omitted.

Your original point was that node.js has an edge because it has something nobody else has - low memory footprint, low latency, quick time-to-market, scalable. If the response is that "any modern web framework"can do it, then your point does not stand at all.

Sorry, communication gap. I was only referring to the part - "> can spin up a http service in a day Surely this is a typo?" I thought we were contesting that point only. I agree that a lot of frameworks can do that. On top Node/JS also allow developers to do web/native(ish with RN) and desktop apps with great tooling, libs etc. this combo is hard to beat.

I think the confusion is around the phrase "spin up," which usually refers to the starting of a process or machine. I think what you meant is that developers can write an HTTP service in a day--referring to the speed of development for Node.js.

Re: I finally escaped Node

#140
post #43
post #19

We went away from node as a backend technology for a bunch of reasons. Here's a list of the biggest pain points: - Lack of a good standard API; compared to environments like Java, C# or Go, node's standard library is significantly sparse. - The tendency for small libraries/frameworks leads to a very high number of third party code with all the problems attached; bigger attack surface, licensing challenges, it's econo…

How do you feel about the impact on developer productivity after migrating to Java + Spring Boot? I haven't used Java in a long while and every time that I try to come back to it, I get driven away by the difficulty and complexity to do simple things (thinking of annotations, dependency injection, complicated design patterns). It feels like an effort of one hour of Node or Python programming (or even Go) would take 1…

Spring makes simple things easy and difficult things impossible. Spring Boot was created to mitigate some of the mess Spring is, specifically that mere mortals can not assemble version compatible libraries that comprise Spring so spring Boot does it for them.
Post reply on HN