[tor-dev] Onionoo in Python

Arturo Filastò art at torproject.org
Fri Jul 13 13:14:01 UTC 2012

On 07/10/2012 05:36 PM, Norman Danner wrote:
> 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?
> To me, there is a trade-off:
> Cyclone+Twisted:  slightly nicer way to write the web application.  
> More dependencies for Onionoo.
> Plain Twisted:  not quite as nice a way to write the application.  
> Fewer dependencies for Onionoo.

Maintaining a REST API in pure twisted is *very* painful. The syntax for 
defining the API in twisted
is very hackish and unclean. Using cyclone makes your code more 
structured and cleaner.
The hackiness is very clear if you are interested in doing things like 
matching to a certain functionality
based on a regexp. Cyclone makes this easy as it's based on tornado that 
was designed with the creation
of an API for friendfeed in mind.

> Also, the documentation for Cyclone seems...minimal.  It might be 
> straightforward for someone used to using Tornado, but that doesn't 
> describe us over here...

The documentation of cyclone is the documentation of tornado. Cyclone is 
basically just a fork of it
so anything that you are used to doing in tornado you can do in cyclone.

- Art.

More information about the tor-dev mailing list