Hacker News new | ask | show | jobs
by eurleif 5368 days ago
I like node.js, but this post completely misunderstands "Node.js is Cancer". The point of that post isn't that node.js is slow; its point is that node.js does concurrency, but not parallelism; i.e., if your code is CPU-bound, it can only serve one request at a time.
3 comments

It's a bit extreme to conclude that since Node's built-in HTTP server works this way, that it's "cancer." People still use it because it suits their purposes; there's nothing wrong with that.

AFAIK, nothing's stopping anyone from writing a CGI module for Node. It took years for Python to come up with WSGI and Ruby to come up with Rack. People are fed up with CGI and I don't blame Node's developers for excluding it.

> AFAIK nothing's stopping anyone from writing a CGI module for Node.

Indeed, nothing has stopped several people from doing it:

    $ npm search cgi
    NAME            DESCRIPTION                                                   AUTHOR             KE
    cgi             A stack/connect layer to invoke and serve CGI executables.    =TooTallNate
    fastcgi-stream  Fast FastCGI Stream wrapper for reading/writing FCGI records. =samcday           fc
    koku            Node.js bindings for the Mac finance app Koku                 =cgiffard
    nodeCgi         A fastcgi-like server designed to accept proxied requests from a web server and exe
    scgi-server     SCGI (Simple Common Gateway Interface) server                 =yorick            SC
Exactly. This is not about performance, it's about parallelism.
there is a good post about this on stack overflow... that parallelism in nodejs is more of a hack.. http://stackoverflow.com/questions/4631774/coordinating-para...