1
votes

I am confused by Microsoft's roadmap. The use of OWIN is to separate a web app from IIS, and thus OWIN was developed. Now IIS can host an OWIN developed app, or the idea is any web server can host the OWIN app. In fact, the OWIN app can be self-hosted, meaning no web server (per se) is required - the self-hosting is a lightweight web server.

So now enters the picture ASP.NET Core with Docker containers. Do these require OWIN, or are they a different animal altogether? Can they co-exist with OWIN? Why use OWIN with Docker? Why choose Docker over OWIN. Many questions about the proper direction and future of web apps using Microsoft technologies. Perhaps I am thick and missing the point. Feel free to flame me.

2

2 Answers

4
votes

First, OWIN was not developed by Microsoft. It was a third party spec that Microsoft bought into. It didn't last very long before Microsoft deviated from that spec, although you CAN still build OWIN based apps, the standard Microsoft middleware is not OWIN (though it is based on OWIN to some degree).

Second, containers have nothing to do with this. Containers are just a distribution and runtime environment that isolates the application into its own virtual space without the overhead of full OS virtualization. This has nothing to do with IIS, ASP.NET or OWIN.

Finally, Microsoft's .net core self-hosted web server is called Kestrel, which can actually be linked into IIS (without the IIS dependencies of the application) via a shim module. Or it can be a stand-alone HTTP server.

Also, one of the primary purposes of OWIN was to abstract the HTTP context away from the application, and with .net core they had the opportunity to redesign the HttpContext to be independent of IIS, so this need was greatly reduced in .NET core. There is still need for middleware, so the team developed their own similar middleware without some of the limitations of OWIN.

0
votes

Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applications. OWIN is just a specification.

Katana is a Microsoft's implementation of OWIN specification. However, we call (OWIN) Middlware for short.

Whether you self-host ASP.NET app or run behind IIS through ASP.NET Core Module, the request still passes through OWIN Middlware (orange box in MVC Request Life Cycle).

The same concept still applies for Docker container.

enter image description here