[Twisted-Python] Using Twisted inside mod_python

Bob Ippolito bob at redivi.com
Thu May 5 16:05:37 EDT 2005


On May 5, 2005, at 4:01 PM, jarrod roberson wrote:

>
>
> On 5/5/05, Bob Ippolito <bob at redivi.com> wrote:
> On May 5, 2005, at 3:34 PM, jarrod roberson wrote:
>
> > I want to embed a Twisted Server ( specifically a ZeroConf
> > implemenation I wrote ) into Apache2.
> >
> > I have it running from a PythonImport and attaching to an
> > interpreter and all that goodness.
> > It prints out all the queries and answers it received to the apache
> > log just fine. Apache works just fine serving normal stuff.
> >
> > The problem is anytime I make any kind of method calls into my
> > global object from a handler it just hangs Apache2 :-(
> >
> > I have tried it with worker.c and prefork.c and both exhibit the
> > same behavior.
> >
> > Any suggestions?
>
> I don't think this is going to work.  At all.  Twisted needs more
> control than it's allowed to have from Apache.  You'll need to run
> all your Twisted stuff in a separate process and ProxyPass it to
> Apache (or some similar decoupling).
>
> -bob
>
>
> that was what I was afraid of but did not want to hear :-(
>
> can I at least use a Perspective Broker client from a handler you  
> think?

No, not unless you write a Perspective Broker client that doesn't  
depend on Twisted.

-bob





More information about the Twisted-Python mailing list