Over a million developers have joined DZone.
Platinum Partner

Notes on Node.js and Windows Azure

· Cloud Zone

The Cloud Zone is brought to you in partnership with Mendix.  Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.

Notes from a Level 200 session by Nathan Totten.  I'm live blogging from TechEd Australia...

Node.js is an open source/open framework built on Google’s Chrome engine.

JavaScript on the server… Event drive I/O server-side JavaScript. ; Runs on a single thread..Not thread based, therefore small heap allocation. ; Efficient and scalable.

All operations are essentially queued, and actioned by the single thread. ; The thread can’t afford to hang!

Good At

  • Realtime comms/quick chatty interfaces
  • REST interfaces
  • JSON web services
  • Client oriented web-apps/UI

Bad At (or not great at)

  • Forms over CRUD (can be done, but maybe not the best choice)
  • CPU intensive processing (don’t render media, images.. too intensive)


  • JavaScript – common language
    • Not a lot of standardization, different styles
  • Clean API
  • Simple concurrency model (is it concurrent??)
  • Idle connections cost next to nothing
  • Modular


  • Not a lot of standard framework inclusions
    • No particular testing framework etc
  • Young, still developing
  • Bare metal.. not for the inexperienced.. not great IDE support etc

Application Frameworks

  • Connect
  • express
  • geddy
  • (fab)

Node.js on Windows

Native build on Windows. ; Ported from Linux, can host Node processes on IIS with IISNode, which gives the benefits of IIS. ; Modules which work on other platforms will work on Windows. ; Contains package manager support from the commandline.

Node.js on IIS

  • Process management
  • Access to logs
  • Side-by-side with other content
  • Scalability on multi-core
  • Auto-update
  • Minimal node code changes
  • integrated management experience

Showing how to implement a HTTP server variable in Node.js script. ; Can be self hosted? ; Implements a web server (single threaded?). ; Command line tools written in Node.js. ; Windows Azure tools included.

Most Node.js/Windows Azure functionality can be developed without visiting the Azure control panel page. ; Supports inline GIT support – interesting. ; A bit of deployment pain as access is denied. ; Heading to the Azure Control Panel after all…



Using the command line to invoke the server side GIT repository to create the appropriate folders. This might be tough for non-GIT users to follow. TFS users looking baffled.

Packages being pulled down (like NuGet), but on the Azure server side. Site is now up and running. Deployment history is tracked on the Azure side. This allows rollback functionality. The GIT integration is quite nicely done.  Somewhere Ted Buchan is grinning.

Deployments look pretty impressive, but a knowledge of GIT would be most handy.

Debugging Node.js

There’s something called a NodeInspector. It runs in a web browser (but not Internet Explorer), so now we’re loading Google Chrome...ironic. It’s a matter of putting the Node server into debug mode.

NodeInspector...why does that remind me of Inspector Gadget? Go go Node [thing]!

Node Inspector

Yes, you can also remote debug assuming the correct ports are opened.

Node Supervisor

Watches files for changes..  Otherwise, to void the cache, you’d have to restart the Node server.  Installed as a package through command line:  npm install node-inspector –g


Enables poling, web socket style functionality.  Installs as per command line.  Works on almost any browser, real-time communication requires long polling or web sockets.

Socket.IO supported

As Azure is running currently on Windows Server 2008 R2, and that only IIS 8 (Server 2012) supports web sockets, as a consequence the current Node.js support in Azure needs to use long polling (as mentioned before).  This will be changed...soon.

Head to github to find out more – this is open source stuff.

There are undoubtedly some interesting uses for this approach. It will be one to watch.

The Cloud Zone is brought to you in partnership with Mendix. Better understand the aPaaS landscape and how the right platform can accelerate your software delivery cadence and capacity with the Gartner 2015 Magic Quadrant for Enterprise Application Platform as a Service.


Published at DZone with permission of Rob Sanders , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}