Top Banner
OWIN WEBAPPS OwinHost System.Web & IIS
21

OWIN

Jul 08, 2015

Download

Software

About Microsoft OWIN and Katana Hosting
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OWIN

OWIN WEBAPPS

OwinHost

System.Web

&

IIS

Page 2: OWIN

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]

Page 3: OWIN

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

Page 4: OWIN

THE ENVIRONMENT

Contains all the request, response properties in a generic dictionary

of string , object

Page 5: OWIN

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

Page 6: OWIN

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

Page 7: OWIN

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

Page 8: OWIN

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

Page 9: OWIN

OWINHOST.EXE

Mainly used for development purposes

Primary advantage of opting for OWIN is the complete ASYNC

support and pluggable DI

Page 10: OWIN

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

Page 11: OWIN

HOW OWIN HOST

& IIS COMPARE

Page 12: OWIN

MEMORY FOOTPRINT

OWIN Host

IIS

Page 13: OWIN

APPDOMAIN FOOTPRINT

IIS

Way too heavy to show up in half a slide

OWIN Host

Page 14: OWIN

We gotta scroll

more

Page 15: OWIN

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

Page 16: OWIN

OWIN COMPATIBLES

WebAPI

SignalR

FubuMVC

Nancy

SimpleWeb

Page 17: OWIN

STAGE MARKERS

Page 18: OWIN

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

Page 19: OWIN

OWIN IN ACTION - II

Embedded Server within an App

Branching Pipelines

Owin Web API with SelfHosting

WebApi Using System.Web

Page 20: OWIN

TAKEAWAY

IIS

Entire .Net Framework Stack for Enterprise LOB apps

OWIN

Portable Apps

Small to Medium loaded apps

Helios

Cloud Ready Apps

Page 21: OWIN

THANKS FOR LISTENING