Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev
Zope 2 WSGI investigation
 

Index | Next | Previous | View Flat


optilude+lists at gmail

Jan 1, 2012, 11:39 AM


Views: 479
Permalink
Zope 2 WSGI investigation

Hi,

There are three known WSGI implementations of the Zope 2 publisher.
I've had a look at them and made some notes about what I think
provides the best story:

## Zope 2.13 WSGIPublisher

Pros:

* Allows distributed transaction management with repoze.tm2
* Allows distributed retry with repoze.retry
* Ships with Zope
* Quite simple

Cons:

* Requires repoze.tm2 and repoze.rety
* Does not properly emit publication events - possible patch in
https://gist.github.com/1548061
* Does not do error handling or exception views
* Claims not to properly implement streaming (though there is some code for it)
* Probably less well tested than infrae.wsgi and repoze.zope2 (at
least there is zero documentation)

## infrae.wsgi

Pros:

* Clean and well documented
* Properly emits publication events
* Supports streaming
* Supports simplified virtual hosting with X-VHM-Host
* Supports exception handling / error views
* Reportedly has significant production use

Cons:

* Not 100% compatible (but close and fixable) - fix to make
plone.transformchain work is here: https://gist.github.com/1547328
* Unnecessary five.grok dependency (but easy to rewrite to use ZCML
registration)
* No support for middleware transaction and retry management, so these
can't be distributed across a WSGI pipeline
* Error logging will not support ZMI error_log and assumes single process
* Error handling is slightly different to standard publisher's
exception views, and also does not honour existing
standard_error_message etc

## repoze.zope2

Pros:

* Clean and well documented
* Reimplements and simplifies the BaseRequest.traverse() code, with comments
* Supports distributed transaction management and retry

Cons:

* Replicates a lot of Zope startup code
* Has now-unnecessary code to manage instances and configuration
* repoze.obob abstraction is unnecessary since nothing else uses this
* Does not emit publication events - possible patch in
http://bugs.repoze.org/issue181
* Does not do error handling or exception views
* Problems with file resources (does not properly traverse to
browserDefault() result) -- possible patch in
http://bugs.repoze.org/issue64
* Requires various middleware (repoze.tm, repoze.retry, repoze.vhm)

## Suggested approach going forward

* Integrate infrae.wsgi into Zope 2
* Remove its five.grok dependency
* Use the same exception-views protocol as ZPublisher (mainly, that
the view name is ``index.html``)
* Stop using __ 'private' variables in response.py to make it easier
to work with
* Add some BBB support for existing error logging and error messages

Thoughts?
Martin
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )

Subject User Time
Zope 2 WSGI investigation optilude+lists at gmail Jan 1, 2012, 11:39 AM
    Re: Zope 2 WSGI investigation wichert at wiggy Jan 2, 2012, 12:50 AM
        Re: Zope 2 WSGI investigation optilude+lists at gmail Jan 2, 2012, 2:39 AM
    Re: Zope 2 WSGI investigation chrism at plope Jan 2, 2012, 10:39 PM
        Re: Zope 2 WSGI investigation optilude+lists at gmail Jan 2, 2012, 11:32 PM
    Re: Zope 2 WSGI investigation chrism at plope Jan 3, 2012, 12:01 AM
        Re: Zope 2 WSGI investigation optilude+lists at gmail Jan 3, 2012, 2:13 AM
    Re: Zope 2 WSGI investigation sylvain at infrae Jan 3, 2012, 12:34 AM
        Re: Zope 2 WSGI investigation jens at dataflake Jan 3, 2012, 1:04 AM
            Re: Zope 2 WSGI investigation wichert at wiggy Jan 3, 2012, 1:09 AM
        Re: Zope 2 WSGI investigation l at lrowe Jan 8, 2012, 7:36 AM
    Re: Zope 2 WSGI investigation sylvain at infrae Jan 9, 2012, 1:01 AM
        Re: Zope 2 WSGI investigation marius at gedmin Jan 9, 2012, 3:44 AM
            Re: Zope 2 WSGI investigation sylvain at infrae Jan 11, 2012, 2:59 AM
                Re: Zope 2 WSGI investigation aclark at aclark Jan 31, 2012, 2:31 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.