SlideShare ist ein Scribd-Unternehmen logo
1 von 22
INTRODUCTION TO OWIN
Saravanan
AGENDA
 OWIN Introduction
 OWIN and Katana
 Inspiration
 Architecture
 Application Startup & Registrations
 Hosting Methods
 Servers
 Request processing Pipelines
 Modules / Middlewares
 Hosting
 OWIN IIS Pipeline
 OWIN Self-Hosting
OWIN & KATANA
 Open web Interface for .Net
 Spec is here
 Katana: A Microsoft implementation of OWIN
 Not a replacement for ASP.Net / SignalR or WebAPI.
Just offers hosting methods.
 Reduced interaction between the server and the
applications
 Application delegate:
Func<IDictionary<string, object>, Task>
INSPIRATION
 RACK
 Rack provides a minimal, modular and adaptable
interface for developing web applications in Ruby. By
wrapping HTTP requests and responses in the simplest
way possible, it unifies and distills the API for web
servers, web frameworks, and software in between (the
so-called middleware) into a single method call
 Node.js
 Node.js is a platform built on Chrome's JavaScript
runtime for easily building fast, scalable network
applications. Node.js uses an event-driven, non-
blocking I/O model that makes it lightweight and
efficient, perfect for data-intensive real-time applications
that run across distributed devices.
INTRODUCTION
 Minimal, modular and adaptable interface for
developing web applications
 Exposes a wrapper for Http requests and http
responses
 Single method call to handle
 Web Servers
 Middleware
 Web Applications
OWIN
 To decouple server and the web applications
 Defines the structure and requirements of HTTP
request and response interactions
 Support for applications in any platform
Example
 Kayak => runs on nix systems using Mono
ARCHITECTURE
Application: Because Katana is not a replacement for
ASP.NET but rather a new way to compose and host
components, existing ASP.NET Web API and SignalR
applications remain unchanged, as those frameworks can
participate in an OWIN pipeline. In fact, for these kinds of
applications, Katana components will be visible only in a small
configuration class.
Middleware: The name given to all of the components that
handle requests in an OWIN pipeline. It can range from a
simple compression component to a complete framework such
as ASP.NET Web API, though from the server’s perspective, it’s
simply a component that exposes the application delegate.
Server: Responsible for binding to a TCP port, constructing the
environment dictionary and processing requests through an
OWIN pipeline.
Host: The process that runs the application. Can IIS or
standalone executable. The host is responsible for startup,
loading of other OWIN components and shutting down
gracefully.
ARCHITECTURE CONTD..,
APPLICATION START-UP
 IDictionary<string, object> creation and populates any
startup data or capabilities provided by the host.
 Server selection [owinhost or iis]
 Location of the application setup code and invokes it
with the Properties collection.
 Reads and/or sets configuration in the Properties
collection, constructs the desired request processing
pipeline, and returns the resulting application delegate.
 Invokes the server startup code with the given
application delegate and the Properties dictionary.
 The server finishes configuring itself, starts accepting
requests, and invokes the application delegate to
process those requests.
REGISTRATION
 Uses the Pre-Application Start to configure OWIN
HOSTING METHODS
Details IIS Pipeline
Integration
OWIN pipeline
Supported by IIS Katana.exe
Modules HttpModules OMC [OWIN
middleware
Components]
OWIN Startup Via OwinHttpModule Startup
Stage based code
plugin
Via IIS pipeline stages Via Stage markers
SERVER
 IIS
 OwinHost
 CustomServers
WHY HAVE PIPELINES [SOC]
 Authentication: Plug-in various authentication
mechanisms. How do I validate this OAuth, HTTP
Basic Authentication, name/password?
 Authorisation: "is the user authorized to perform
this particular task?", i.e. role-based security.
 Caching: have I processed this request already,
can I return a cached result?
 Performance & Usage Monitoring: what stats can
I get from the request and response?
 Execution: actually handle the request and provide
a response.
OWIN / IIS PIPELINE STAGES
OWIN Pipeline Stages IIS Pipeline Stages
TRADITIONAL IIS HTTPMODULE
OWIN MIDDLEWARE COMPONENTS [OMC]
OWIN MIDDLEWARE
 Grouping and ordering of the modules
 Are run for each request
 Similar to that of a HttpMessageHandler
[subscribes to each request]
Sample Middlewares
 Static file renderers
 WebAPI
 Nancy [web framework for mono]
ENVIRONMENT
 All states, including
 application state,
 request state,
 server state etc,
 are held in the IDictionary<string, object> object
specified on the application delegate.
 This is passed from component to component as a
request progresses through the pipeline
 No specific .NET object model, such as those of
HttpContextBase in ASP.NET MVC or
HttpRequestMessage/HttpResponseMessage in
ASP.NET Web API
OWIN IIS PIPELINE
OWIN SELF-HOST
MORE INFORMATION
 OWIN: http://owin.org/
 OWIN Spec: http://owin.org/spec/owin-1.0.0.html
 Katana: https://katanaproject.codeplex.com/
 Katana Documentation:
https://katanaproject.codeplex.com/documentation
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Owin & katana
Owin & katanaOwin & katana
Owin & katana
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6
 
Powershell For Developers
Powershell For DevelopersPowershell For Developers
Powershell For Developers
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Building a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootBuilding a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring Boot
 
Debugging your Way through .NET with Visual Studio 2015
Debugging your Way through .NET with Visual Studio 2015Debugging your Way through .NET with Visual Studio 2015
Debugging your Way through .NET with Visual Studio 2015
 
O que é esse tal de OWIN?
O que é esse tal de OWIN?O que é esse tal de OWIN?
O que é esse tal de OWIN?
 
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introduction
 
IIS Always-On Services
IIS Always-On ServicesIIS Always-On Services
IIS Always-On Services
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 

Ähnlich wie Introduction to OWIN

Ähnlich wie Introduction to OWIN (20)

OWIN
OWINOWIN
OWIN
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Owin katana en
Owin katana enOwin katana en
Owin katana en
 
Mvc
MvcMvc
Mvc
 
Owin and-katana-overview
Owin and-katana-overviewOwin and-katana-overview
Owin and-katana-overview
 
Owin and katana overview
Owin and katana overviewOwin and katana overview
Owin and katana overview
 
Getting Started with API Management
Getting Started with API ManagementGetting Started with API Management
Getting Started with API Management
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
 
sMash_for_zOS-users
sMash_for_zOS-userssMash_for_zOS-users
sMash_for_zOS-users
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
Spring interview questions
Spring interview questionsSpring interview questions
Spring interview questions
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Cloud APIs Overview Tucker
Cloud APIs Overview   TuckerCloud APIs Overview   Tucker
Cloud APIs Overview Tucker
 
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
 
Spring learning path
Spring learning pathSpring learning path
Spring learning path
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Spring diy projects
Spring diy projectsSpring diy projects
Spring diy projects
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with Spring
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Introduction to OWIN

  • 2. AGENDA  OWIN Introduction  OWIN and Katana  Inspiration  Architecture  Application Startup & Registrations  Hosting Methods  Servers  Request processing Pipelines  Modules / Middlewares  Hosting  OWIN IIS Pipeline  OWIN Self-Hosting
  • 3. OWIN & KATANA  Open web Interface for .Net  Spec is here  Katana: A Microsoft implementation of OWIN  Not a replacement for ASP.Net / SignalR or WebAPI. Just offers hosting methods.  Reduced interaction between the server and the applications  Application delegate: Func<IDictionary<string, object>, Task>
  • 4. INSPIRATION  RACK  Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call  Node.js  Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non- blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
  • 5. INTRODUCTION  Minimal, modular and adaptable interface for developing web applications  Exposes a wrapper for Http requests and http responses  Single method call to handle  Web Servers  Middleware  Web Applications
  • 6. OWIN  To decouple server and the web applications  Defines the structure and requirements of HTTP request and response interactions  Support for applications in any platform Example  Kayak => runs on nix systems using Mono
  • 7. ARCHITECTURE Application: Because Katana is not a replacement for ASP.NET but rather a new way to compose and host components, existing ASP.NET Web API and SignalR applications remain unchanged, as those frameworks can participate in an OWIN pipeline. In fact, for these kinds of applications, Katana components will be visible only in a small configuration class. Middleware: The name given to all of the components that handle requests in an OWIN pipeline. It can range from a simple compression component to a complete framework such as ASP.NET Web API, though from the server’s perspective, it’s simply a component that exposes the application delegate. Server: Responsible for binding to a TCP port, constructing the environment dictionary and processing requests through an OWIN pipeline. Host: The process that runs the application. Can IIS or standalone executable. The host is responsible for startup, loading of other OWIN components and shutting down gracefully.
  • 9. APPLICATION START-UP  IDictionary<string, object> creation and populates any startup data or capabilities provided by the host.  Server selection [owinhost or iis]  Location of the application setup code and invokes it with the Properties collection.  Reads and/or sets configuration in the Properties collection, constructs the desired request processing pipeline, and returns the resulting application delegate.  Invokes the server startup code with the given application delegate and the Properties dictionary.  The server finishes configuring itself, starts accepting requests, and invokes the application delegate to process those requests.
  • 10. REGISTRATION  Uses the Pre-Application Start to configure OWIN
  • 11. HOSTING METHODS Details IIS Pipeline Integration OWIN pipeline Supported by IIS Katana.exe Modules HttpModules OMC [OWIN middleware Components] OWIN Startup Via OwinHttpModule Startup Stage based code plugin Via IIS pipeline stages Via Stage markers
  • 13. WHY HAVE PIPELINES [SOC]  Authentication: Plug-in various authentication mechanisms. How do I validate this OAuth, HTTP Basic Authentication, name/password?  Authorisation: "is the user authorized to perform this particular task?", i.e. role-based security.  Caching: have I processed this request already, can I return a cached result?  Performance & Usage Monitoring: what stats can I get from the request and response?  Execution: actually handle the request and provide a response.
  • 14. OWIN / IIS PIPELINE STAGES OWIN Pipeline Stages IIS Pipeline Stages
  • 17. OWIN MIDDLEWARE  Grouping and ordering of the modules  Are run for each request  Similar to that of a HttpMessageHandler [subscribes to each request] Sample Middlewares  Static file renderers  WebAPI  Nancy [web framework for mono]
  • 18. ENVIRONMENT  All states, including  application state,  request state,  server state etc,  are held in the IDictionary<string, object> object specified on the application delegate.  This is passed from component to component as a request progresses through the pipeline  No specific .NET object model, such as those of HttpContextBase in ASP.NET MVC or HttpRequestMessage/HttpResponseMessage in ASP.NET Web API
  • 21. MORE INFORMATION  OWIN: http://owin.org/  OWIN Spec: http://owin.org/spec/owin-1.0.0.html  Katana: https://katanaproject.codeplex.com/  Katana Documentation: https://katanaproject.codeplex.com/documentation