[Twisted-Python] Replacement for CherryPy

James Gregory james at james.id.au
Thu Oct 15 20:02:12 EDT 2009

Hi all,

I'm trying to replace a server that I've written with CherryPy to use 
Twisted. My reasons are that my particular app has the server waiting on 
sockets to third-party services a lot of the time, which is tying up all 
the worker-threads I have allocated for CherryPy => scalability nightmare.

In short, I want to be able to write a class more or less like so:

class C:
     def searchData(self, query, resultCount) :
         # produce a deferred that will eventually return the data to go 
back to the client, d.
         return d

And have it exposed such that fetching


will call that searchData method, passing in the URL's GET parameters as 
the arguments to that method. It'd be awesome if it also worked for 
POSTed data too.

I realise that I can probably build this myself using twisted.web etc, 
but am wondering if someone's already done the legwork here.

Any suggestions?

Thanks in advance.


More information about the Twisted-Python mailing list