But the WSGI Lite protocol is actually backwards compatible with WSGI. You can write code to the WSGI Lite API, and transparently interoperate with existing WSGI servers, apps, and middleware.
Correct me if I'm wrong, but doesn't this mean that it's WSGI extra rather than WSGI lite? I mean, you don't generally consider the lite version of something to have the all the features of the full version and then some.
Another way to look at it is as an adapter to a "new" WSGI interface specification. The fact that it's backwards compatibile allows it to be used with existing WSGI tools, but future WSGI Lite-compatible software could implement the Lite API directly.
That being said, I've only briefly looked over the WSGI Lite code and neither advocate nor criticize its direction.
> I don't know if you realize this, but the author, P.J. Eby, is the same guy who wrote the original WSGI spec.
yup (though to conclude anything from that fact is a clear fallacy).
I've realised that what I actually disliked most was his blog-post and not the actual project (I've used identical shims to wsgi-lite by choice over the years).
"CAN'T REPLACE WSGI WITH SOMETHING BETTER? CHALLENGE ACCEPTED"
"WSGI IS DEAD" (Except when it isn't.)
I realise that the above was probably done for facetious editorial reasons rather than his actual intention with the lib. He hasn't really replaced wsgi, he admits should only be used wherever appropriate
Armin uses the async point in part to give technical reasons why WSGI can't really be replaced in full, before concluding that he thinks replacing WSGI for purported notions of pluggable utopia is a red-herring anyway before posing the question of any WSGI replacement: does this really '[make] frameworks work better with each other?'
This actually seems like a reasonable approach to me. WSGI isn't really friendly to application developers (because it's not the API they expect when they naively approach the problem) so mostly it's been wrapped by the various frameworks. Armin's article seemed to be saying "Stop bitching that you can't use WSGI because it's more complex than you think. Here's why. Just pick a framework."
This approach seems to take care of the 90% problem while leaving the full power of WSGI exposed if you want/need it. It's like a minimalist web framework to do just the smoothing over of the WSGI API and nothing else.
The backwards compatability is key: It can be adopted by application developers, and doesn't depend on server developers.
It may not have sprung into existence in a perfect form but I think it is definitely worth exploring this approach.
Ok, I'm using WSGI every day but I haven't delved down into the details of it. But what would be the benefits of using WSGI Lite instead of the regular WSGI? Performance?
well, that's not quite all. if you're writing middleware you sometimes have to write a some (mostly reusable) extra code to pass as the start_response() to other wsgi callables. (to access the headers and/or munge anything sent by .write() -- or disallow .write() entirely).
I always thought of WSGI as a bridge between the web server and whatever web framework you happen to use, but this and the referenced article talk a lot about interaction between different frameworks and applications.
I don't really understand what is meant by this. Does this mean they want Django to interact with, say, Bottle?
Correct me if I'm wrong, but doesn't this mean that it's WSGI extra rather than WSGI lite? I mean, you don't generally consider the lite version of something to have the all the features of the full version and then some.