[mod_python] Multi-tier functionality

Graham Dumpleton grahamd at dscpl.com.au
Tue Oct 4 19:20:07 EDT 2005


David Clarke wrote ..
> This might be a little out of left field. Say I wanted to use mod_python in
> a mult-tier environment where I have a website that uses mod_python, some
> business rules, and a database. I want to minimise the coupling between the
> tiers, i.e. I don't want to make database calls directly from my web tier.
> What is a good approach for doing this? What is a good mechanism for hosting
> business rules?

One way would be to embed all the business logic and database access in
a separate process which implements a XML-RPC server. The code written
in mod_python can then use XML-RPC calls to access the backend server to
do the real work. One could also use a full messaging system to
communicate between mod_python handlers and the backend rather than XML-
RPC. This would possibly avoid the socket creation costs associated with
individual XML-RPC calls.

Graham


More information about the Mod_python mailing list