TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The emperor's new clothes were built with Node.js

91 pointsby erjiangalmost 11 years ago

14 comments

dapalmost 11 years ago
Just because lots of people say &quot;non-blocking, good concurrency, event-based model&quot; without understanding it doesn&#x27;t mean it&#x27;s not correct. With a single-threaded, event-based model, you can get an awful lot of concurrency at reasonably consistent latency without ever thinking about threading issues or managing thread pool size to balance memory and concurrency -- and often with less memory, too.<p>Yes, there are downsides: it&#x27;s not a natural model for many people; you do still have to consider <i>many</i> complex concurrency-related issues; and control flow libraries are usually needed to make complex code much more readable. But these are either easy to deal with or intrinsic to the complex problem at hand, and the above still stands: once you understand how to program with this model, the &quot;default&quot; implementation usually scales very well.<p>Yes, Node was not the first to do this, but that&#x27;s not relevant to anything.<p>Besides all that: I&#x27;d put Node&#x27;s postmortem debugging and dynamic tracing capabilities up against any other dynamic environment.<p>As a side note: it&#x27;s enormously condescending to tell people that a very broad technical choice is not only wrong for <i>their</i> technical problem -- without even knowing what it is! -- but that they&#x27;re also part of some mass delusion for even thinking that there&#x27;s anything to it. I hate arguing about this stuff. You keep trashing Node, and we&#x27;ll keep using it to build large distributed systems.
评论 #7858532 未加载
kybernetikosalmost 11 years ago
If you read the interviews with Ryan Dahl, one big reason he chose javascript for his scripting language after considering a number of other options was that javascript did not already have a huge body of blocking libraries.<p>If you&#x27;re trying to script a nonblocking system where everything is nonblocking all the way up and down the stack, you&#x27;re going to end up creating a parallel ecosystem to the normal one, and confuse people by not allowing them to do the normal things they would do in language X.<p>Javascript didn&#x27;t already have a huge blocking ecosystem.<p>And speaking of ecosystem, that&#x27;s another really good reason to like node. The stream programming that is coming out of the community is brilliant, and the focus on constructing large projects by writing thin modules that use other thin modules (&#x27;onion oriented programming&#x27;) is fantastic.<p>I&#x27;ve been doing a lot of Scala recently, and it&#x27;s extremely noticeable that despite the languages power to do things in many different ways, the Scala community frequently seem to choose a strangely convoluted path filled with hidden magic going on behind the scenes where every new library you depend on feels like learning a new language from scratch.<p>It might well be that the Go community is also as good as the node community for some of this stuff, but the community and library ecosystem is a definite plus point.<p>Personally I&#x27;ve never had a problem with Javascript coding. It&#x27;s perhaps easier to write stupid code in it than a lot of other languages, but I know it well enough to know where to be disciplined, and it almost never surprises me now.
pessimizeralmost 11 years ago
This is the article I&#x27;m going to refer people to to explain the problems that I have with nodejs. All of these (absolutely true) observations aside, I really like how the the nodejs trend has brought concurrent async-style thinking into the mainstream of web programming.<p>By &quot;all of these observations aside,&quot; I mean that I <i>hate</i> working with it personally, and I&#x27;ll be using Erlang&#x2F;Webmachine thank you, but I learn new ways to think about modern problems every day from many of the great people that are part of the nodejs juggernaut.
hardwaresoftonalmost 11 years ago
Sarcasm is pretty heavy in this article, but I think it&#x27;s a little overly negative...<p>He makes a lot of comparisons with Go, but Go was created after Node. Many of the languages he notes as possible replacements for the non-blocking rant are obtuse (I love Haskell, but there&#x27;s no way it&#x27;s not obtuse)<p>[EDIT] - turns out they were made pretty much at the same time 2009... Learned something today, I guess. Felt like Go came after node to me but I guess it didn&#x27;t<p>Also, I must be the only one that doesn&#x27;t really mind callbacks. Maybe it&#x27;s stockholm syndrome.<p>I also think node should get kudos for at least seeming different enough to prompt the move from enterprise customers. Any move away from burdened &quot;enterprisey&quot; software is worth praising I think. Not because java is bad&#x2F;lame by default, but instead because it might prompt other companies to lust after something new that might be better (whether it&#x27;s python, node, go, or haskell is irrelevant)
评论 #7858271 未加载
评论 #7858228 未加载
评论 #7858250 未加载
评论 #7858272 未加载
评论 #7858161 未加载
评论 #7859305 未加载
aespinozaalmost 11 years ago
I agree with a lot of the arguments in the article, but I do feel a very negative opinion about Node.js. I don&#x27;t believe Node.js is that bad.<p>The 2 points I always hear from Node.js are:<p>1) Node.js is fast. It is really not that fast. It all depends on what you are comparing it to.<p>2) It is easy to learn. It is not easy to learn. The difference between browser javascript and V8 javascript are considerable. Not everybody will pick it up as easy as you imagine, specially if you are choosing Node.js to allow frontend devs work on backend code. It is a very different mindset.<p>I like the idea that is Node.js, but I don&#x27;t think it is mature enough to take over the backend. I think there are other more mature languages right now that do the job without making programs look like spaghetti code.<p>I think people should take this article with a grain of salt, and keep getting their hands dirty in Node.js. I think it has a future in the cloud.
mambodogalmost 11 years ago
Why is it that most of the articles which pop up complaining about node&#x27;s concurrency options don&#x27;t even mention streams? For most data-manipulation tasks, FRP-style composition of higher order operations on streams turns out to be the best choice; not callbacks, promises, etc. Not even bringing them up in a discussion of concurrency in node makes it hard to take the article seriously.
评论 #7858599 未加载
评论 #7858451 未加载
评论 #7858681 未加载
评论 #7858427 未加载
akilismalmost 11 years ago
Computer Programming: A million wrong ways to do something and a million right ways to do something.
评论 #7858210 未加载
评论 #7858216 未加载
mslideralmost 11 years ago
Isn&#x27;t it just the case that nodejs is the least worst way of writing a concurrent web server? we know it&#x27;s not perfect, but what is?
评论 #7858006 未加载
评论 #7857942 未加载
评论 #7858019 未加载
评论 #7858257 未加载
aashishkoiralaalmost 11 years ago
I love your ending :) &quot;Does your local Node.js Meetup group need a presenter? I am available for paid speaking engagements. Email me for more info.&quot;
lognalmost 11 years ago
I prefer <a href="http://silkjs.net" rel="nofollow">http:&#x2F;&#x2F;silkjs.net</a><p>It handles each request in a forked subprocess so it&#x27;s a lot more straight forward.
评论 #7858053 未加载
ilakshalmost 11 years ago
I use ToffeeScript. Its a nice alternative to nested callbacks that looks like normal synchronous code.
general_failurealmost 11 years ago
Node is popular because it is fairly simple to learn and use. That really is the mains reason why I have seen most people pick it up.
评论 #7858190 未加载
评论 #7858082 未加载
compsci_mofoalmost 11 years ago
We learnt that Node wasn&#x27;t cancer, but it also wasn&#x27;t a good technology either. Still, it was useful in keeping the clueless muppets away, lest they fuck up other tech ecosystems.
woahalmost 11 years ago
These articles always seem to boil down to only one thing- &quot;I&#x27;m bad at callbacks&quot;.<p>I mean, really, is there any other criticism here? There is a valid point about the true nature of Walmart and Paypal&#x27;s rewrites, but that&#x27;s pretty tangential.<p>There&#x27;s kind of a thing about some completely rookie mistakes in error handling, but that&#x27;s really not relevant to anything, and again, tie into the &quot;I&#x27;m bad at callbacks&quot; thing.<p>I&#x27;d really be interested in some criticisms of node that aren&#x27;t variations on stories of the author&#x27;s past difficulties with callbacks, as most people who use node have no problems with them.<p>EDIT: Downvotes? Please, point out to me the part of the article that is not about callback troubles.