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