Click here to load reader
Upload
knappt
View
1.198
Download
0
Embed Size (px)
DESCRIPTION
A presentation introducing the Repoze project, which is a project to (amongst other things) implement WSGI support in Zope . This was presented by Tim Knapp of Emerge Technology at the NZPUG Christchurch meetup in April 2008.
Citation preview
An Introduction to
Tim Knapp, Emerge Technology
Repoze and WSGI
● WSGI standard began in 2004● Repoze began in 2007● Repoze is about:
– allowing non-Zope developers to take advantage of Zope technologies via WSGI
– allowing Zope developers to take advantage of WSGI components
WSGI Components
● Servers accept requests from browsers/clients and pass request data along to applications. They also respond to requests using data returned by the application.
● Middleware is an application that calls "the next" application; functional composition forms a "pipeline".
● Applications return status, headers, response body.
Middleware Is Cool
● Deliverance, HTML/XML output transformation. Repoze.org.
● evalerror, catch exceptions and query information about them via a browser.
● repoze.tm, move transaction management out of the publisher and into middleware.
● repoze.pam, move authentication out of apps.● repoze.profile, do Python profiling via
middleware.● repoze.errorlog, see exception history via
middleware.
Why Do Zope Users Care?
● Python web frameworks which have embraced WSGI:
● Python web frameworks which haven't:
Top-Level Packages
● repoze.zope2
● repoze.plone
● repoze.grok
repoze.zope2
● Re-implementation of Zope 2's ZPublisher to fit into a WSGI stack "natively".
● As a result, run Zope2 within Apache using mod_wsgi.
● Goal: 100% backwards compatibility with all Zope 2 products.
● Goal: 100% egg-based package installation.● Goal: move many Zope 2 features out into
middleware.
Dependencies
● repoze.zope2 depends heavily on Ian Bicking's Paste, particularly PasteDeploy, which provides a declarative syntax for configuring WSGI "pipelines".
● Phillip Eby's setuptools.
repoze.zope2 in Development
repoze.zope2 in a Deployment
What's Different
● No effort so far to make repoze.zope2 work on Windows (but not actively preventing it).
● Zope 2's standard_error_message doesn't do anything (a generic 500/404 error handler in "httpexceptions" replaces it).
● The Zope 2 error_log object doesn't log exceptions.
● zopectl is gone, replaced with single-purpose scripts.
Installing and Starting
● easy_install and virtualenv based via http://repoze.org/quickstart.html.
● Buildout-based via http://svn.repoze.org/buildouts.
● bin/paster serve etc/zope2.ini
Let's See It
● http://www.repoze.org● irc://irc.freenode.net#repoze● http://lists.repoze.org