[tor-dev] Onionoo in Python

Sathyanarayanan Gunasekaran gsathya.ceg at gmail.com
Tue Jul 10 17:23:46 UTC 2012


> 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?

Cyclone provides a much nicer API than Twisted with routing done
right. I haven't played around with Twisted much, but I'm liking how
Cyclone works. Cyclone does a bunch of stuff like converting a dict to
a json and setting the proper response headers automagically(which was
a "Aha" moment for me, I'm not sure if Twisted does all this).

> 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.

I'd definitely prefer Cyclone+Twisted. Cyclone ships with a couple of
Debian scripts that make it easier to run as well.

> 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...

Well, that's true. There isn't much documentation, but it uses almost
the same API as Tornado so you can pretty much use Tornado's docs. But
that isn't much either so I kinda ended up reading Cyclone's source
and that worked. It's actually pretty easy to follow. But, I can see
how this can become a real pain.

-Sathya


More information about the tor-dev mailing list