2

I was reading about iisnode what i get is that iis node allow to host nodeJS applications in IIS.

So i'm asking you to:

First:: what is iisnode exactly? what can i do with it?.

Second:: I was wondering if i could use it along with my asp.net web forms application?? and if so could you provide me with simple tutorials. And please i need complete tutorials not just piece of code.

Thanks for your help.

ebram khalil
  • 8,252
  • 7
  • 42
  • 60

2 Answers2

1

From the IISNode wiki here what is iisnode

iisnode is a native IIS module that allows hosting of node.js applications in IIS on Windows.

Behind the scene, IISnode is how Microsoft host node.js applications on its cloud platform Azure. More on this here: Node.js on Windows Azure & iisnode

Note Azure is not mandatory, you can host node.js on plain IIS without Azure, but Microsoft had to develop this to be able to host node.js in a very scalable way. The wiki page lists all advantages of IISnode.

That has nothing to do with ASP.NET. ASP.NET can also be hosted on IIS, but it's a complete different architecture. You can mix both on the same machine, but they are not closely related.

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
  • so can i use both node and asp.net in the same web application? i mean can i make interactions between them both? and how if i could do that? – ebram khalil Dec 30 '12 at 11:30
  • You can use both in the same application, but they don't really communicate, only using client urls that points to ASP.NET pages or the Node.Js handler. Another good link is this http://weblogs.asp.net/jgalloway/archive/2011/10/26/using-node-js-in-an-asp-net-mvc-application-with-iisnode.aspx – Simon Mourier Dec 30 '12 at 18:02
1

Is you environment in Azure? You could spin up one of the default Linux VMs, Install Nginx (http://wiki.nginx.org/Main) and run Node on there. I would also look into Cloud 8 IDE (https://c9.io/)

I started looking at Node about a year ago...and I know this doesn't answer your question directly, but you are asking (intro/basic) simple questions..I would pick up: Node.js In Action (http://www.manning.com/cantelon/), which includes very good tutorials and deep level intro into Node.js

To answer you question you asked about interacting ASP.NET with Node.js, absolutely it can work on several levels. You can have a Node.js server implemented using RESTful services, POX Services, Socket.io/WebSockets and they can interact with ASP.NET on the server side and/or use Ajax calls from your client to the Node.js endpoints.

That is actually the preferred way of implementing a complex/enterrpise application since Node.js is great for non-blocking I/O...however it is not great a synchronous tasks (complex CPU intensive tasks). Therefore, you can have your Node.js services do your: data retrieval/CRUD operations and ASP.NET handle the Business Logic (i.e. any complex math, physics, LINQ, concurrency tasks etc.)

Bart Czernicki
  • 3,663
  • 1
  • 21
  • 19