After some research I've determined that there are a lot of similarites between these two projects, but their purposes aren't identical.
They both define an interface for chainable middleware and applications, but
- Connect assumes that the server is node.js, which means it does not have to define an interface for server > middleware/application communication.
- WSGI on the other hand defines several requirements for this layer of communication, mostly with regards to the environment dictionary, which is based on CGI with some WSGI extensions. The chainable middleware is a secondary concern and is achieved automatically because WSGI middleware is so similar to a WSGI server (and WSGI application)
So, what I'm looking for is a WSGI-like specification and implementation in .NET. This will free server- and framework developers from each other and allow .NET web apps to be much more pluggable.
The answer is OWIN (Open Web Interface for .NET), a WSGI-like specification with several implementations, including but not limited to:
- OWIN.Gate, a C# library of OWIN utilities including the "onion-layering" of middleware
- Frack, an F# library inspired by Rack which is the exact same effort for Ruby.
- Another project, Fix, was a proof of concept for the OWIN concepts but has since been replaced by OWIN.Gate for all intents and purposes.
- Kayak is an async HTTP server similar to node.js which is able to host OWIN middleware and applications
- Manos contains an HTTP server with OWIN support.
- Nancy is a web framework that allows hosting in an OWIN environment.
So it's pretty clear that OWIN will be .NET's answer to WSGI.
There is also an active Google Group for .NET server, framework and web application developers that focuses on the abstractions required to allow seamless integration of all the components in a .NET web stack. OWIN is frequently discussed by the members.