[Grok-dev] Grok and WSGI

Martijn Faassen faassen at startifact.com
Sat Mar 27 12:43:18 EDT 2010


Hi there,

Souheil CHELFOUH wrote:

> The big problem I faced is the monolithic and so-called pluggable zope
> publisher, which is fat, big, unfriendly and highly frightening.
> Thus, my very straightforward question : Do you think it would make
> sense, for Grok (the Grok package, the application manager), to spend
> time and rewrite something decent, using the best of WSGI ?

A longstanding wishlist item of mine is to rewrite the publisher, which 
would handle translating URLs to object calls and make sure there's a 
request object and such.

The idea would be to make it:

* exist in a single package

* uses WebOb's request and response object. This implies an upgrade path 
where people can slowly migrate their views to webob views.

* break backwards compatibility in detailed APIs. but existing URLs 
should work.

We should have some kind of upgrade period where people can have both 
old and new publisher at the same time.

A new publisher might also allow us to dump a lot of packages. The 
drawback though is that a LOT of packages depend on the request object, 
and upgrading them to a new request object would be a lot of work. We'd 
need to make an inventory of what uses the request object and how we 
might upgrade away from it. Probably it's correlated to what depends on 
zope.publisher, either directly or indirectly.

> The fact that I have to jump between 5 packages and about 6
> adaptations to get a request object totally driven me off using Grok
> with my webservices.

Yeah, I can imagine. Though I'm not sure what you're trying to 
accomplish; while the situation is not ideal underneath it's certainly 
possible to write web services either using Grok's REST support or just 
with GET/POST and views.

> I came back to an utterly Paster application and, i'm not ashamed to
> say so, it felt really good to understand what's going on without
> needing painkillers.

Anyway, yeah, long-standing wishlist item for Grok, big project though.

Regards,

Martijn



More information about the Grok-dev mailing list