[tor-dev] Onionoo in Python

Norman Danner ndanner at wesleyan.edu
Tue Jul 10 20:42:01 UTC 2012


I agree, Twisted is not a web application framework.  So the question is 
this:  do we want/need a web application framework for Onionoo?  It 
seems like it is such a straightforward service (process one of a very 
few different request types, send back a JSON response) that maybe any 
web application framework is overkill.

According to Sathya, Cyclone does have some functionality for converting 
dicts to JSON (of course, so does the json standard library module) and 
sets response headers properly automatically.  So that also makes some 
of the coding easier and possibly more maintainable.  The latter is 
definitely not to be sneezed at; I just don't have enough experience 
with either Twisted or Cyclone to know whether it makes up for the 
additional dependency.

	- Norman

On 7/10/12 3:04 PM, meejah at meejah.ca wrote:
> Norman Danner <ndanner at wesleyan.edu> writes:
>
>> Based on a quick look, it seems like Cyclone provides a slightly
>> nicer way to specify how to handle the various requests than does a
>> plain Twisted web application.  Are there any other advantages to
>> using Cyclone as opposed to plain Twisted?
>
>  From what I understand of the two systems, Twisted's "web stuff" isn't
> really intended as a "web application framework" (yet?) and you'd
> probably want Nevow or Twisted.web2 for that anyway. Cyclone and
> Tornado, OTOH, *are* Web frameworks. The advantage of Cyclone being
> that it's based on the core Twisted async "stuff" rather than
> Tornado's homebrew (and hence supports more things, has tests,
> cross-platform support, etcetera).
>
> Using Cyclone would also allow you to use txtorcon, as it's based on
> Twisted too :)
>

-- 
Norman Danner - ndanner at wesleyan.edu - http://ndanner.web.wesleyan.edu
Department of Mathematics and Computer Science - Wesleyan University




More information about the tor-dev mailing list