[mod_python] ConnectionHandler Problem and RPC protocols

Graham Dumpleton graham.dumpleton at gmail.com
Thu Jun 4 21:45:39 EDT 2009


2009/6/5 Ufuk Haciogullari <narsil7_ at hotmail.com>:
> Hi all
>
> I have been studying mod_python for a school project.I wanted to use python
> as my programming language.  It is about implementing all sorts of RPC
> protocols(from socket to SOAP,XML-RPC). There has to be only one client
> application but I am not sure how many servers can be. It wouldn't be too
> hard if I could have a server for each protocol. Anyway I wanted it to be as
> low-level as possible so I would have an understanding of how things work.
> In the end I thought if I had a ConnectionHandler as server side I could
> read the request decide what protocol it uses then call that procedure. This
> is the plan for now. Feel free to comment, I would appreciate some help
>
> For now I can't get a ConnectionHandler working. I tried Req Handler and it
> worked just fine. When I try Connection Handler,I get an 'internal server
> error' . I did everything like it was described here: http://www.modpytho!
> n.org/live/current/doc-html/pyapi-conn.html
>
> I also added "AddHandler mod_python .py " to .htaccess but no success.
> Maybe I did something wrong, couldn't find a similar problem in any mailing
> list

What version of mod_python are you using?

  http://issues.apache.org/jira/browse/MODPYTHON-102

Connection handlers are rarely used so possibly other bugs lurking in
there as well.

I get the impression you are perhaps going about this the wrong way as
you still need XML-RPC/SOAP to work over HTTP and as soon as you use
connection handlers, don't think that is possible as you are
responsible for everything. You are therefore likely better off doing
everything as a request handler. You aren't going to make anything
simpler by using a connection handler.

BTW, look around and you will already find implementations of
XML-RPC/SOAP endpoints for mod_python and newer WSGI interfaces which
can be hosted on mod_wsgi and other WSGI servers. So, you may also be
partly reimplementing the wheel.

Graham



More information about the Mod_python mailing list