Layering terminology in the OWIN spec

68 views
Skip to first unread message

Chris R

unread,
Jan 16, 2013, 12:40:25 PM1/16/13
to net-http-a...@googlegroups.com
Hey Folks,

As developers begin to adopt OWIN I've heard some confusion expressed at the terminology defined in section 2 of the spec:
http://owin.org/spec/owin-1.0.0.html
 
2. Definitions
This document refers to the following software actors:
·           Server – The HTTP server that directly communicates with the client and then uses OWIN semantics to process requests.  Servers may require an adapter layer that converts to OWIN semantics.
·           Web Framework – A self-contained component on top of OWIN exposing its own object model or API that applications may use to facilitate request processing.  Web Frameworks may require an adapter layer that converts from OWIN semantics.
·           Web Application – A specific application, possibly built on top of a Web Framework, which is run using OWIN compatible Servers.
·           Middleware – Pass through components that form a pipeline between a server and application to inspect, route, or modify request and response messages for a specific purpose.
·           Host – The process an application and server execute inside of, primarily responsible for application startup. Some Servers are also Hosts.
 
 
Specifically, there has been more than a little confusion expressed between the terms Server and Host.  This ambiguity is aggravated by the fact that these roles are sometimes merged into the same component (e.g. IIS/ASP.NET).  In discussions so far, no terms have been found to more accurately describe what is currently defined as Server except perhaps Host (hence the confusion).  On the other hand the layer currently defined as Host may be more clearly described as Process, as its description already includes.
 
Proposal - Clarify the terms as follows:
- Host - The HTTP server that directly communicates with the client and then uses OWIN semantics to process requests.  Hosts may require an adapter layer that converts to OWIN semantics.
- Process - The container an application and host execute inside of, primarily responsible for application startup. Some Hosts provide their own Process.
- Web Application – A specific application, possibly built on top of a Web Framework, which is run using OWIN compatible Hosts.
- Middleware – Pass through components that form a pipeline between a host and application to inspect, route, or modify request and response messages for a specific purpose.
- Web Framework – A self-contained component on top of OWIN exposing its own object model or API that applications may use to facilitate request processing.  Web Frameworks may require an adapter layer that converts from OWIN semantics.
 
See the attached diagram for layering.  This could also be added to the spec.
 
How does that sound, would this change adequately reduce confusion?  Are there clearer terms for Host and Process?
 
Thanks,
~Chris
TermModel.png

Damian Hickey

unread,
Jan 17, 2013, 5:10:02 AM1/17/13
to net-http-a...@googlegroups.com
Seems reasonable to me.

Grumpydev

unread,
Jan 17, 2013, 5:13:43 AM1/17/13
to net-http-a...@googlegroups.com
I don't think you can define middleware like that, or separate it from a framework. 

You may well have a middleware that serves static content for instance - that certainly isn't "passthrough". 

A "framework" could also pass request processing on, for instance it might set a send file header and call the next middleware in the chain.

Kevin Swiber

unread,
Jan 17, 2013, 6:40:22 AM1/17/13
to net-http-a...@googlegroups.com
tl;dr Don't revise it; remove it! :)

This seems a little over-specified to me.

For cases where we're augmenting existing solutions, we include OWIN adapters in-between:

1. Web Server
2. OWIN Server Adapter
3. Middleware
4. OWIN Application Adapter
5. Web Application

Adapters are a side note.

The OWIN design allows for middleware, but middleware components are invisible to both the server and Web app.

1. Web Server
2. Middleware
3. Web Application

Middleware is a side note.

There are only two main components:

1. Web Server
2. Web Application

This specification, it seems to me, should really be focused on defining a standard interface between Web Servers and Web Applications.  That's it.

Some of these implementation details should be pulled out into another document or an appendix at the very least.  That might skinny up the spec a bit and make it more palatable.

I think this approach might have more value than swapping the terminology definitions (of which the spec hardly uses).

Regards,

Kevin

<TermModel.png>

Chris R

unread,
Jan 22, 2013, 12:22:48 PM1/22/13
to net-http-a...@googlegroups.com
Well, that was at least a variety of responses...
 
Kevin, terms like Server are used extensively in the spec, so we do need to be clear about what that is and is not.  Yes, the server and the application are the primary components and accordingly are the focus of the spec, but I still think it's useful to mention the other components and how they're involved.
 
GrumpyDev, I agree that since the spec was initially written we've spent more time working with middleware and frameworks and the two concepts are slowly merging.  Some middleware return responses, and some frameworks pass through.  Let me take another stab at that:
 
·           Host – The HTTP component that directly communicates with the client and uses OWIN semantics to process requests.  Hosts may require an adapter layer that converts to OWIN semantics.
·           Middleware – Components added to the request processing pipeline that provide additional functionality, e.g. inspection, routing, or modifying request and response messages for a specific purpose.
·           Web Framework – A self-contained component on top of OWIN exposing its own object model or API that applications may use to facilitate request processing.  Web Frameworks may require an adapter layer that converts from OWIN semantics.  Frameworks may be used to implement middleware or end points.
·           Web Application – A specific application, possibly built using one or more Web Frameworks and/or Middleware, which is run using OWIN compatible Hosts and Processes.
·           Process – The executable container an Application and Host run inside of, primarily responsible for application startup. Some Hosts provide their own Processes.

 
 

From: ksw...@gmail.com
Subject: Re: Layering terminology in the OWIN spec
Date: Thu, 17 Jan 2013 06:40:22 -0500
To: net-http-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages