There’s been a lot of talk lately about “Project Helios” and changes to ASP.NET. I finally sat down and spent some time figuring out what the heck is going on (which is probably a good idea, since I’m an ASP.NET MVP :)
From what I can tell, Project Helios is an attempt to take all the benefits of writing web applications in .NET and decouple them from the traditional “web forms” ASP.NET that we know. With the pace that the web is evolving, Microsoft has found multiple times that the development cycle of .NET (of which ASP.NET is inextricably linked to) just can’t keep up to new web dev technologies. Proof of this is the ASP.NET MVC, WebAPI, and SignalR frameworks – all developed and maintained completely out of band with the traditional .NET framework cycle out of necessity.
OWIN and Katana
To do this, they’re building on two existing projects, OWIN and Project Katana. OWIN (The Open Web Interface for .NET) is an attempt to abstract the relationship between web servers (particularly IIS) and web frameworks (specifically ASP.NET). With OWIN, you end up with two separate components – a web server whose only responsibility is to populate an “environment” dictionary from an incoming request, and the web framework, who accepts that environment dictionary and writes back to an output stream provided by the web server. Compare this to the existing IIS relationship with ASP.NET, where the ASP.NET pipeline is tied directly to IIS’s internal components. With this abstraction, you could potentially run any OWIN-compatible web framework on any OWIN-compatible web server allowing you to run an OWIN ASP.NET web application on any number of hosts / cloud services / operating systems that support OWIN.
Project Katana is an attempt to abstract ASP.NET components from the .NET framework, making ASP.NET projects “cloud-friendly”. When ASP.NET first started out, it was developed in such a way that it required a heavy dependence on .NET and shipped with a massive web framework, both of which cause issues when you start talking about “cloud scale” web applications. For example, a MVC web application loads more than just MVC – it loads 17 System.Web assemblies, Runtime.Caching, Microsoft.JScript, System.Drawing, System.EnterpriseServices… well, you get the point. Project Katana is an attempt to decouple the massive web framework into a bunch of smaller, independent modules with a focus on self-hosting. This enables ASP.NET web applications to be a lot more lightweight, extensible, and with increased performance, particularly in a hosted environment.
ASP.NET without ASP.NET
So where does Project Helios fit in? Project Helios is kind of a child of the two OWIN and Katana projects – Helios is where the two come together. With Helios you can write a lightweight application that functions (and codes) like a self-hosted application, but run it on top of any OWIN-compatible server (such as IIS). Helios applications look a lot like Node or Go applications, where you actually write your own request/response handling application layer.
Looks more like Node than ASP.NET, eh?
Because of this, Helios doesn’t have to load all of the ASP.NET framework, and actually won’t work with traditional web applications that use web forms or Razor / MVC pages. This is because the assemblies that process those requests aren’t actually loaded in a default Helios web application. You get the benefit of a lightweight application that doesn’t load the overhead of System.Web, but the disadvantage of having to code your entire web application layer yourself.
Not all web applications will benefit from this approach – this is strictly for those web applications who need to deal with high availability and performance issues. If you’re currently using the benefits of a server-side templating system like ASP.NET MVC or Web Forms, Helios really provides no advantages to you (at least until someone writes a lightweight template system on top of it). If, however, you’re playing with some high bandwidth or availability applications such as a popular web service or real-time web socket application, Helios is something you should definitely consider.
For more information, check out Introducing ASP.NET Project “Helios”