[Zope-dev] Writing my own request-handler

Thomas Weholt thomas@cintra.no
Tue, 24 Oct 2000 15:10:25 +0200


Hi,

I want to write my own request in Zope. I want a specially formatted 
request or a command to be intercepted and processed by my own modules. If 
the user tries to access a url like
http://www.myserver.org/myhandler or using a specific port on the server 
Zope traps this and my request_handler sends data back to the user based on 
the url .

Why? I got a PostgreSQL database as a backend for a huge information 
organization project. I want to serve xml using a fast and stable solution 
like Zope or Medusa to do this, since I also need ftp for object-uploads, 
allthough these are not stored in ZODB. A normal ftp-server is used, and 
hopefully I could set up a normal medusa kind of ftp-server on a given port 
to do this, and avoid all the files being stuffed into the ZODB. I got a 
lot of non-Linux ( therefore as far as a know, non-postgresql-python users 
) so I want to give them xml to process using a know protocol like HTTP.

How can I write my own class/handler that traps this and serves my data ? I 
really want to use Zope cuz I use it for the rest of the site. I cannot 
serve all the postgresql data using plain zope-database methods cuz I want 
to write several clients in other programming languages that can receive 
and process the xml-format I use. The thing I want isn't xml-served as 
html, it's xml served to non-browser apps using HTML and ZOPE as means of 
delivery.

Of course all of this is to be written in old-fashioned python, no 
Zope-products.

Any hints, tips or guides is highly appreciated. I've looked at the Medusa 
source and found a couple of things that nearly does what I want them too, 
especially in the script_handler_demo-folder, but I'd like to get the whole 
thing into Zope if I could.

Thanks.