2009-09-14

Python Community in Anguish, Pain, Despair Over Web Server

First they had the guts to punk TechCrunch, now Facebook picks a fight with the Python community by releasing a web server, called Tornado, developed by recently acquired Friendfeed.

Terry Jones, CEO of Fluidinfo, probably best expressed the pain felt by Pythonistas: "Words fail me on this one. I’ve spent some hours today trying to put my thoughts into order so I could put together a reasonably coherent blog post on the subject. But I’ve failed."

Facebook's Bret Taylor explains the reasons for such a highly unpopular move: "We ended up writing our own web server and framework after looking at existing servers and tools like Twisted because none matched both our performance requirements and our ease-of-use requirements."

The performance myth was quickly dismissed by an article which shows that Twisted performs almost as well as Tornado.



Pwpwp looked at the Twisted documentation, to dispel the ease-of-use myth. The wiki page Twisted Web Plan (aka What's Going On With Twisted Web) explains:

Currently there is a lot of confusion as to what to do and where to go to get a good, supported twisted.web server. Users are confronted with 3 options and an infinite number of permutations of those options: twisted.web, nevow, and twisted.web2. This confusion is made manifest in the lengthy explanation of web development with twisted hosted here on this wiki.

This is mostly a problem of perception, but there are some real issues. For example, there is a lot of redundant maintenance going on in, for example: twisted.web.static, twisted.web2.static, and nevow.static; twisted.python.urlpath and nevow.url; nevow.appserver and twisted.web.server.

As you can see clearly, it's mostly a problem of perception. The page continues with inspiring optimism:
However, at some point in the future, there will be one supported, good web server in the Twisted community, and that will be twisted.web.
A second page, titled Web Development With Twisted functions as a "roadmap to the wilderness that the landscape of web development with Twisted has become."

In conclusion, Twisted performs almost as well as Facebook's "cobbled together" newfangled Tornado, and Twisted developers have provided a clear roadmap to the "wilderness that the landscape of web development with Twisted has become".

Why Facebook/Friendfeed decided to create a new web server is completely beyond us.

15 comments:

Michael Campbell said...

I can't answer the "why" question, but "almost as good" isn't the same as "as good". Too, it seems that twisted.web is "almost as good" ... until it isn't, which if that graph is to be believed, occurs at 50 concurrent connections. 50? Seriously? It craps out after that?

Like I said, I can't answer for the Tornado developers, and I don't have a dog in this fight, really, but the faux righteous indignation at not using twisted seems rather ... small.

Anonymous said...

I know only a little about each of these, but my understanding is that Tornado also has a web framework (a lightweight Django, if you will).

The value of Tornado seems to be that it is a small, lightweight, cohesive package for doing event-driven Web applications. More than just a Web server.

I don't think FB people are doing this to pick a fight with Pythonistas. Even though objectively that may be the result.

Speculating, I think that FB is all PHP, and they decided to set free the Python code in the same way that Google open-sourced Jaiku (a Twitter clone written in Python) after it became an orphan in the Google portfolio.

Anonymous said...

This kind of closemindedness is what makes Python a terrible community.

I knew to avoid python in general when I learned what pythonic meant, it means that you accept silly design decisions because guido did.

",".join(str_list) anyone?

Anonymous said...

Tornado is faster than Twisted. See here: http://antoniocangiano.com/2009/09/13/benchmarking-tornado-vs-twisted-web-vs-tornado-on-twisted/

Measuring the performance with ab on a MacBook Pro is not accurate in the least.

Michael Foord said...

What a bizarre, annoying and attention seeking headline.

Anson MacKeracher said...

So much drama, over so little.

Anonymous said...

What fight?

Ian Bicking said...

There is much hand-wringing among several Twisted people about Tornado. Twisted != Python Community.

mb said...

It's not just twisted ...

Check out the veiled hostility when Bret Taylor (FriendFeed) offers to donate time to integrate Tornado with Django.

http://groups.google.com/group/django-developers/browse_thread/thread/8d1b7f514ef4e88e

Mike said...

That cracked me up.. thanks.

Ian Bicking said...

Re: the Django thread, Bret suggested that maybe it would make sense to have some code in Django core for Tornado, and there was reluctance to do that because for Django developers that means they have to maintain and document that code. So Russ steered them towards something more separate. I didn't read any hostility into it at all, just the regular negotiations of project integration.

Manuel Simoni said...

Update: I have tagged this as "satire" for your convenience.

earl said...

Brilliant, Manuel!

mb said...

Ian, Bret made it pretty clear he wasn't looking to change Django core, but was willing to donate time to implement a native Django handler as a module in Tornado.

http://groups.google.com/group/django-developers/browse_thread/thread/8d1b7f514ef4e88e

You know better than I do, but Russ' response sounded a little defensive.

As a Python and Django developer, I'd rather see Django (and twisted, and web.py, etc.) enthusiastically embrace Tornado's contribution.

Steve said...

I'm glad you added the Satire tag...well-enough written that I wasn't entirely sure. ;) Love it!