Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Did not expect to see EM-httpserver kicking ass.


I think it's a c++ library (based on scanning the docs -- I could be wrong), so it's not too surprising to see it outperforming pure Python solutions.


Indeed. http://github.com/eventmachine/eventmachine/raw/b4765960db91...

  EventMachine consists of an extension library written in C++ (which can be
  accessed from languages other than Ruby)
So the post compares pure Python web frameworks with a C++ library. And not even a good library based on Boost/Asio or libevent.


55% of EventMachine's codebase is written in Ruby. Some parts of Tornado is written in C.


Only in the sense that Python is written in C. Tornado has a C module to expose the epoll system call on older versions of Python, but it's not needed at all with Python 2.6.


Is eventmachine's c++ lib really not a "good library"? If not, why?


It reinvents the wheel. As a developer, you have to have really good reasons not to use it. Especially since Boost license is practically AS-IS, they could have taken the original source.

It is possible they are better at this problem than others, but that is very unlikely, from experience. As a developer it isn't wise to do a reliability test on a new library by yourself.

Making a portable async framework is quite error-prone because of the heterogenous situations it could face. You can witness this reading libevent's evolution over the years. And those developers are as good unix coders as you can possibly get with vast experience on the subject (since mid 90s.) I bet the Boost/Asio guys are very good C++ coders too, Boost is as close as you can get to STL.

At a glance, http://rubyeventmachine.com/ doesn't state why a new C++ async library. They only mention the Reactor Pattern, and Boost/Asio supports it:

http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/ove...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: