[Twisted-Python] To twisted.web beginners: don't use RPYs

Christopher Armstrong radix at twistedmatrix.com
Mon Jun 23 16:44:29 MDT 2003


On 2003.06.23 15:20, Bill Gribble wrote:
> >   site = server.Site(Simple())
> >   reactor.listenTCP(8080, site)
> >   reactor.run()
> 
> ... and moshez barfed up a kidney when I said I was doing listenTCP
> manually, saying that listenTCP was about to be deprecated with extreme
> prejudice and should be avoided.  No real reason given other than "it's
> a bad idea".

The reason was that .rpy *is* the stardard way to deploy twisted.web 
applications, and if you want to be friendly to other twisted.web users,
you should give an .rpy so it's easy for them to install your software
on their existing web server.

And listenTCP is not about to be deprecated with extreme prejudice -- I 
don't remember talking about that, although there have been ideas to
replace it in the long run. As exarkun said, it won't be depracated until
2.0, because it's already a stabilized interface.

( I've noticed that when people see some musings on future development
  in Twisted, they start freaking out about what the current standard
  practice is and have a panic attack. DISCLAIMER: The following 
  paragraph is full of musings about future directions of Twisted;
  it's not implemented, and nothing is changing about standard practice
  now.

moshez also has other interesting ideas for deployment on twisted.web
servers. We may come up with a scheme that allows you to easily run your
web applications in a separate process, listening on a unix domain 
socket, and then using a standard parameterized .rpy to connect to the
domain socket and serve the app from the main server. The point, of 
course, would be to have process separation so you don't have to worry
about bugs in the app bringing down your server (if they're that rude).
Stay tuned for more.
)


-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/




More information about the Twisted-Python mailing list