If you are not familiar with Katana, read this article An Overview of Project Katana which talks about the history and goals behind OWIN/Katana.
In this post I want highlight Katana's architecture around decoupling host and server from the application.
Lets look at some hosting options for OWIN application
- Custom Host: You can host owin application in a console application or OwinHost (prebuilt Katana host) using Microsoft.Owin.Host.HttpListner.
- IIS: Owin applications can be hosted in IIS using Microsoft.Owin.Host.SystemWeb server package. Unfortunately with this package, you do not get a lean host as it adds the standard ASP.NET piple. Thats where Helios comes to rescue where we can get all the benefits of IIS without the traditional ASP.NET pipeline.
- Node.js: Using connect-owin middleware, we can host Owin application in Node.js too.
I have created a demo web api application which highlights how easy it is to switch between different hosts without changing your application. The source code is available here.