Live data from Hacker News

Tornado: FriendFeed's non-blocking Python web server is now open source

bret.appspot.com

31–40 of 77 posts

Re: Tornado: FriendFeed's non-blocking Python web server is now open source

#33
post #29
post #15

Awesome to see more Python webservers coming to light, and fast ones at that. One observation though; anyone else notice that the bar chart is a bit misleading? It compares running Tornado in 4 processes behind nginx to running Django behind Apache and Cherrypy as a single Python process. As a fellow coworker put it, "With 4 extra processes running of course it will be 4 times as fast." I'm not opposed to this kind o…

Apache/mod_wsgi creates multiple processes (or can). The issue is that Facebook didn't tell us what configuration settings they used. Did they limit the number of processes? Did they not have it start up enough at the start? It's clear that Facebook wasn't using a single Apache/mod_wsgi process because that wouldn't get close to 2,000 requests per second. I'm sure they gave it the number of processes that were approp…

and the way they handle request in non-blocking way still have many benefits over Django in real web application especially if you have to make many calls to "other" http server to fetch data which happens a lot in today's world.

Re: Tornado: FriendFeed's non-blocking Python web server is now open source

#34
post #24

Bret, quick question. Does the framework support an esi type tags to abstract out personalized info? thanks!

I am not sure what esi type tags are. Mind sending me a link? Suffices to say, no, we do not support that :)

Edge Side Includes. Proxies like Squid and Varnish support it for inclusion of dynamic data in otherwise cache-able pages.

http://www.w3.org/TR/esi-lang

It seems like this would not be mandatory in Tornado, since it is an app server; from my reading I'm assuming all pages are dynamic.

Re: Tornado: FriendFeed's non-blocking Python web server is now open source

#35
post #24

Bret, quick question. Does the framework support an esi type tags to abstract out personalized info? thanks!

I am not sure what esi type tags are. Mind sending me a link? Suffices to say, no, we do not support that :)

:-)

ESI: http://www.akamai.com/html/support/esi.html

e.g. When you and I log into ff, simplifying greatly, that page would say, "Welcome, Bret" or "Welcome, Prakash". If you could abstract away "Bret" and "Prakash", that page would be cacheable. And, the db hit is only for that particular fragment.

You would need to re-code the pages with esi tags to do it. The other way would be to use javascript to do the same.

What do you think?

Re: Tornado: FriendFeed's non-blocking Python web server is now open source

#36
Definitely rough around the edges, but looks like a great foundation.

A few notes: - template.py: "Error-reporting is currently... uh, interesting." - url mapping looks primitive - no form helpers - database.py looks decent, but is mysql only - Very nice to see the security considerations in signed cookies, auth, csrf protection.

Overall, it looks like they've done the trickier parts of building a web framework and left it to the user/community to add the parts web developers use most frequently (form & url helpers, code organization, and orm).

I love Facebook's enlightened approach to open source. If only one of their open source projects takes off, it will benefit them tremendously.

Re: Tornado: FriendFeed's non-blocking Python web server is now open source

#37

What exactly does 'non-blocking' mean in the context of a webserver?

Holding the TCP connection open does not tie up all the resources of the request handling thread. That way a large number of inactive connections can stay open.

Re: Tornado: FriendFeed's non-blocking Python web server is now open source

#40
post #16

This is great. Any idea if they will do the same for the FriendFeed datastore?

As I recalled, FriendFeed uses MySQL as the "datastore" backend, but with very different table layout. Check out this article: http://bret.appspot.com/entry/how-friendfeed-uses-mysql
Post reply on HN