views:

908

answers:

4
+2  Q: 

Apache vs Twisted

I know Twisted is a framework that allows you to do asynchronous non-blocking i/o but I still do not understand how that is different from what Apache server does. If anyone could explain the need for twisted, I would appreciate it..

+2  A: 

They are two different things, one is a pure WEB server and one is a WEB framework with a builtin event driven servers.

Twisted is good for constructing high-end ad-hoc network services.

Chmouel Boudjnah
+6  A: 

Twisted is a platform for developing internet applications, for handling the underlying communications and such. It doesn't "do" anything out of the box--you've got to program it.

Apache is an internet application, of sorts. Upon install, you have a working web server which can serve up static and dynamic web pages. Beyond that, it can be extended to do more than that, if you wish.

ewall
+2  A: 

FYI, FriendFeed/Facebook just open sourced their custom server and framework: Tornado. Matt Heitzenroder of Apparatus has run an initial comparison test and looks like Tornado left twisted in the dust.

The numbers you linked to clearly show that Twisted responded faster and handled slightly more requests. Of course this benchmark does not take features into account either.
Tom Leys
+2  A: 

@alphazero You read that Twisted vs. Tornado benchmark wrong (or you didn't read it at all). Quote from the article: " Lower mean response time is better." Twisted is lower. People want their webservers to respond with lower (faster) times.

Twisted leaves Tornado in the dust... or, in reality, they differ by a nearly trivial constant factor.

clemesha