OWIN WEBAPPS OwinHost System.Web & IIS
OWIN WEBAPPS
OwinHost
System.Web
&
IIS
OWIN
Aggregate of the Lowest Common Components
Signal-R , WebAPI has hosting for System.Web and HttpListener
Various frameworks written targeting an abstract server, instaead
of writing each framework against a set of concrete servers
Apps are no longer required to be aware on the server it runs
Performant
Facilitates Unit Testing [production , staging, testing]
MIDDLEWARES
Has a pointer to the next one in the pipeline analogous to
modules
Has a method that does what this middleware promises
The next middleware is initialized when the pipeline gets
constructed
Invoke is called for each request as it comes in
Pipeline is constructed in the order in which they are plugged into
THE ENVIRONMENT
Contains all the request, response properties in a generic dictionary
of string , object
OWIN HOST
Can plug any hosting
• IIS
• Console
• OwinHost
Enables a service / app to be consumed from any source
Raw hosting
Uses IIS features without system.web
Reduced per-request memory size
IIS
App lifecycle management
• Any change in the config, the app is torn down and restarted
Admin capabilities
• Many servers managed in a console
• SSL Management
Application Isolation
Many built-in modules
SYSTEM.WEB
Per-request UI thread which results in deadlocks in Async mode
More latency in version upgrades
No way to customize the items in the System.Web
System.web loads web forms per request
All 401 are turned into a 302 by the forms authentication module
OWIN HOSTING SEQUENCE
WebApp
HostingFactory
Hosting Engine
AppBuilder Creation
• Middleware Pipeline formation
• Environment formation
OwinServerFactory
StartUp call
HttpListener
• ProcessRequestAsync
Application
Application Framework
signalR, WebAPI
Server
system.web, httplistener
Host
IIS, console host
OWINHOST.EXE
Mainly used for development purposes
Primary advantage of opting for OWIN is the complete ASYNC
support and pluggable DI
SYSTEM.WEB RELATED FEATURES
IIS integration (native modules)
Aspnet_regiis &
Aspnet_compiler
Web.config
Virtual Path Provider
HttpRuntime.Cache
Routing
HttpContext
HttpUtility
Session
Health Monitoring
Profile Membership
MS Ajax
Javascript Serializer
WCF / IIS Integration
Machine Keys
Output Cache
Handlers and Modules
HOW OWIN HOST
& IIS COMPARE
MEMORY FOOTPRINT
OWIN Host
IIS
APPDOMAIN FOOTPRINT
IIS
Way too heavy to show up in half a slide
OWIN Host
We gotta scroll
more
ASP.NET MVC
Unfortunately ASP.Net MVC 5.0 does not help out with OWIN
due to large dependency with System.Web
However owin can be plugged into IIS Pipeline
Helios supports hosting MVC with KRE & KLR. This is available
from ASP.Net MVC >= 6.0
OWIN COMPATIBLES
WebAPI
SignalR
FubuMVC
Nancy
SimpleWeb
STAGE MARKERS
OWIN IN ACTION - I
The following are the OWIN Sample Demo’s
HelloWorld - Environment
Helloworld Owin Without Microsoft Implementation
HelloWorld with OWIN
HelloWorld with IISPipeline
HelloWorld with OwinHost
Static file serving with OWIN
OWIN IN ACTION - II
Embedded Server within an App
Branching Pipelines
Owin Web API with SelfHosting
WebApi Using System.Web
TAKEAWAY
IIS
Entire .Net Framework Stack for Enterprise LOB apps
OWIN
Portable Apps
Small to Medium loaded apps
Helios
Cloud Ready Apps
THANKS FOR LISTENING