<Disclaimer I am new to Node.js so this represents my current thoughts and additionally much of my development is on a Microsoft platform so I come from this perspective>
There is a lot of fuss in the web development community at the moment about Node.js and how it’s going to be the next big thing.
The main arguments I have heard for using Node are:
- It’s great for service type stuff as it’s more scalable because of its eventing model, no locks etc
One of the biggest claims you will hear from Node advocates is its superior scalability due to its use of call-backs (async) and no locking. The jury seems to be out on whether Node applications do actually scale better than other alternatives and there are countless blog posts arguing both ways. I don’t know enough about the low level detail to argue either way but let’s assume it’s pretty quick for certain scenarios (basically anything that’s IO bound is a potential candidate).
It’s important to also note that you can develop a similar scalable async model with .net although it certainly wasn’t as easy or intuitive as Node.js (especially without C#5’s Async features).
One thing I will say however in that my consultancy experience it is rarely the technology that is at fault when it comes to performance and let’s face it most of us don’t need our applications to be as scalable as something like LinkedIn or Facebook. More often than not performance issues are due to many calls being made to a database (usually multiple times) and the returning unnecessary data so I am not convinced as to this being a good enough reason to try out Node.
The second issue that bothered me was due to Node’s immaturity – would it have many libraries for tasks such as querying a database? Well I need not have worried as Node.js has a large community and a number of extensions (node packages) have been developed for performing common tasks so this shouldn’t be that much of an issue. I’m not sure I would trust a community developed interface to a product such as SQL Server to be as mature & up to date as Microsoft’s versions through.
Below are the main advantages I can see Node.js offers
- Potentially more scalable for certain tasks
- Developing certain types of services could be more intuitive
- Node.js servuces are light weight and easy to modify
- Anything has to be better than WCF (sorry Himanshu but WCF was written by the devil)
- IISNode makes Node.js very easy to setup on Microsoft platform and benefit from IIS features such as logging, connections etc
- Large number of packages/extensions available
- Node.js apps can be hosted very cheaply compared to an MS based app e.g. Heroku
- For the MS devs Node.js can be hosted on Azure (although its apparently a bit of a pain)
- How many apps actually need Nodes much touted scalability?
- How can a wrapper for something like SQL server be more efficient and feature rich than Microsofts implementations so any perf gains may be negated by usage of poor performing extensions
- Packages may not be maintained aren’t as mature as traditional vendor options
- Poor debugging experience (I understand there is a debugger browser extension available)
- Immature technology – potential bugs and lack of devs skilled in this area
- Can same “perf/scalability gains” be experienced with existing async functionality?
I’d love to have a really good solid reason to use Node.js but having spoken to a number of colleagues no one is yet to give me one.
Sure its cool but I am left with the question what are you actually going to use it for? Er..
I remain open minded and I’d love for someone to give me a good answer to this question 🙂