Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4248128
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:12:31+00:00 2026-05-21T04:12:31+00:00

I’m not very experienced in web programming, and I haven’t actually coded anything in

  • 0

I’m not very experienced in web programming,
and I haven’t actually coded anything in Node.js yet, just curious about the event-driven approach. It does seems good.

The article explains some bad things that could happen when we use a thread-based approach to handle requests, and should opt for a event-driven approach instead.
In thread-based, the cashier/thread is stuck with us until our food/resource is ready. While in event-driven, the cashier send us somewhere out of the request queue so we don’t block other requests while waiting for our food.
To scale the blocking thread-based, you need to increase the number of threads.
To me this seems like a bad excuse for not using threads/threadpools properly.

Couldn’t that be properly handled using IHttpAsyncHandler?
ASP.Net receives a request, uses the ThreadPool and runs the handler (BeginProcessRequest), and then inside it we load the file/database with a callback. That Thread should then be free to handle other requests. Once the file-reading is done, the ThreadPool is called into action again and executes the remaining response.
Not so different for me, so why is that not as scalable?

One of the disadvantages of the thread-based that I do know is, using threads needs more memory. But only with these, you can enjoy the benefits of multiple cores. I doubt Node.js is not using any threads/cores at all.

So, based on just the event-driven vs thread-based (don’t bring the "because it’s Javascript and every browser…" argument), can someone point me out what is the actual benefit of using Node.js instead of the existing technology?

That was a long question. Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:12:32+00:00Added an answer on May 21, 2026 at 4:12 am

    First of all, Node.js is not multi-threaded. This is important. You have to be a very talented programmer to design programs that work perfectly in a threaded environment. Threads are just hard.

    You have to be a god to maintain a threaded project where it wasn’t designed properly. There are just so many problems that can be hard to avoid in very large projects.

    Secondly, the whole platform was designed to be run asynchronously. Have you see any ASP.NET project where every single IO interaction was asynchronous? simply put, ASP.NET was not designed to be event-driven.

    Then, there’s the memory footprint due to the fact that we have one thread per open-connection and the whole scaling issue. Correct me if I’m wrong but I don’t know how you would avoid creating a new thread for each connection in ASP.NET.

    Another issue is that a Node.js request is idle when it’s not being used or when it’s waiting for IO. On the other hand, a C# thread sleeps. Now, there is a limit to the number of these threads that can sleep. In Node.js, you can easily handle 10k clients at the same time in parallel on one development machine. You try handling 10k threads in parallel on one development machine.

    JavaScript itself as a language makes asynchronous coding easier. If you’re still in C# 2.0, then the asynchronous syntax is a real pain. A lot of developers will simply get confused if you’re defining Action<> and Function<> all over the place and using callbacks. An ASP.NET project written in an evented way is just not maintainable by an average ASP.NET developer.

    As for threads and cores. Node.js is single-threaded and scales by creating multiple-node processes. If you have a 16 core then you run 16 instances of your node.js server and have a single Node.js load balancer in front of it. (Maybe a nginx load balancer if you want).

    This was all written into the platform at a very low-level right from the beginning. This was not some functionality bolted on later down the line.

    Other advantages

    Node.js has a lot more to it then above. Above is only why Node.js’ way of handling the event loop is better than doing it with asynchronous capabilities in ASP.NET.

    • Performance. It’s fast. Real fast.
    • One big advantage of Node.js is its low-level API. You have a lot of control.
    • You have the entire HTTP server integrated directly into your code then outsourced to IIS.
    • You have the entire nginx vs Apache comparison.
    • The entire C10K challenge is handled well by node but not by IIS
    • AJAX and JSON communication feels natural and easy.
    • Real-time communication is one of the great things about Node.js. It was made for it.
    • Plays nicely with document-based nosql databases.
    • Can run a TCP server as well. Can do file-writing access, can run any unix console command on the server.
    • You query your database in javascript using, for example, CouchDB and map/reduce. You write your client in JavaScript. There are no context switches whilst developing on your web stack.
    • Rich set of community-driven open-source modules. Everything in node.js is open source.
    • Small footprint and almost no dependencies. You can build the node.js source yourself.

    Disadvantages of Node.js

    It’s hard. It’s young. As a skilled JavaScript developer, I face difficulty writing a website with Node.js just because of its low-level nature and the level of control I have. It feels just like C. A lot of flexibility and power either to be used for me or to hang me.

    The API is not frozen. It’s changing rapidly. I can imagine having to rewrite a large website completely in 5 years because of the amount Node.js will be changed by then. It is do-able, you just have to be aware that maintenance on node.js websites is not cheap.

    further reading

    http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop/

    http://blip.tv/file/2899135

    http://nodeguide.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I need a function that will clean a strings' special characters. I do NOT
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.