Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OWIN and Katana, why decouple the application from the server?

I dont quite get this.. sure its cool to be able to self-host an application and it might be nice since if the IIS goes down for any reason... then all your sites goes down.. but if they are self-hosted then they live there own life in there own context.. which I guess is nice.. But i still dont get the pros of this.. do I skip alot of unnecessary things in the IIS pipe by using owin which speeds the application up, or.. whats the actual pros? (you dont need to list all of them if they are many :), but just so I get why you would like to use OWIN and Katana over the IIS)

Thanks in advance!

like image 966
Inx Avatar asked Aug 05 '13 12:08

Inx


People also ask

What exactly is OWIN and what problem does it solve?

OWIN allows web apps to be decoupled from web servers. It defines a standard way for middleware to be used in a pipeline to handle requests and associated responses. ASP.NET Core applications and middleware can interoperate with OWIN-based applications, servers, and middleware.

What is OWIN and Katana?

Katana is a flexible set of components for building and hosting Open Web Interface for . NET (OWIN)-based web apps. New development should use ASP.NET Core. The Microsoft.

What is an OWIN startup class?

Every OWIN Application has a startup class where you specify components for the application pipeline. There are different ways you can connect your startup class with the runtime, depending on the hosting model you choose (OwinHost, IIS, and IIS-Express).


2 Answers

Your question is valid.

You are probably mostly thinking of web facing web servers. Serving HTML (or json or websockets) can be used for so much more.

I use Nancy instead of IIS because I have a small application that I only want to reach from the inside while IIS is outward facing. Also - if a machine doesn't have IIS I don't have to install it.

Say you run OSX or *nix. Then you can have a very good language and ditto editor and run a simple web server on Mono.

Say you are using a micro controller like Netduino - IIS doesn't fit on it. I doubt Nancy runs there either - but you get the idea; not everything needs a 24 wheeler to haul data.

Say you are automating your house with a Win machine as heart and center. Now, do you really want to install IIS which does godsknowwhat or does it suffice with as little as possible?
If the automated house above is your pet F/OSS project and you are heavy on automated testing. Nancy is well known for that.

Another example take from the near-reality of mine. I have a snow flake server running an outdated Umbraco CMS. I put my soft gloves on before I touch this machine and only so gently.
If I need another web or json server on it Nancy would do the least possible imprint.

The OWIN argument is stale though as Microsoft seems to have Katana more or less out the door.

HTH

like image 90
LosManos Avatar answered Sep 22 '22 17:09

LosManos


A OWIN and Katana overview from MS provides -- historical background and reasoning behind both projects can be found here:

http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana

To summarize from the article:

OWIN: Its goal is not to be the next Web framework, but rather a specification for how Web frameworks and Web servers interact.

Project Katana: The Katana project represents the set of OWIN components that, while still open source, are built and released by Microsoft. These components include both infrastructure components, such as hosts and servers, as well as functional components, such as authentication components and bindings to frameworks such as SignalR and ASP.NET Web API. Katana brings many of the benefits of Node.js (and frameworks like it) -- the simplicity with which one could author and run a Web server -- without forcing the developer to throw out everything she knows about developing ASP.NET Web applications.

like image 29
Aaron Avatar answered Sep 20 '22 17:09

Aaron