What do those scripting Web2.0 languages cost?

We see a lot of people coding their services in Ruby or in PHP, users not really caring about it, and tech journalists finding those new tech like Ruby on rails really cool! But when I read these benchmarks, it made me think...

In practice, you most likely won't notice any huge performance difference between web services written in any scripting language and in good old C/C++, since most will be limited by network latency/bandwidth and/or the quality of their cache strategies.

However, if you took the CPU load into account, as it accounts a lot when you RENT some cloud services like Google App Engine, Amazon Elastic Compute Cloud or maybe Yahoo Sherpa if they finally release it someday, then it would translate into vast amounts of money.

According to those aforementioned benchmarks, C++ performs 90 times better than Ruby, and it seems to mean that you would pay for 90 times more CPU hours if your web service were written in Ruby than for the same service written in C++.

Also, wouldn't C++ be more eco-friendly than Ruby because of its putting lower stress on the hardware translating in a lower carbon footprint? With the current Green trend, will we see more services written in C/C++ then?

PS: on a side note, I find it a shame that C/C++ is still the only available choice in 2009 when you want performance. I would be very happy to refrain myself from using any advanced dynamic features from Python, Ruby, et al. if the guys behind those cute languages provided me with a native compiler producing code as fast as C/C++.

PS-2: C++ quietly continues to evolve behind the scripting teens Web2.0 scene, and now provides some really neat high-performance networking features, like ASIO for instance, which allows for writing AJAX/Web2.0 services almost as easily as you would do with PHP.

UPDATE: Wt, pronounced [wit-ty], is a high-performance C++ Web Toolkit for building rich web apps. It will make use of AJAX if the browser supports it but will also degrade nicely if Javascript is not available. It has a nice signal/slot mechanism inspired by Qt that makes it far more productive than JavaEE. Building a web app with Wt is thus just like building a desktop application. Check it out at http://www.webtoolkit.eu/.

UPDATE: Pion is a nice C++ platform for implementing lightweight HTTP services, built on Boost and the ASIO asynchronous I/O library mentioned above. It is being actively developed (latest version was released only a few days ago).

I would really be interested in hearing your thoughts about this, so don't be shy and drop me a line on Twitter! I am @jcayzac.

Powered by Blogger.