Hacker News new | past | comments | ask | show | jobs | submit login

What this says to me, a non-RoR user, is that it's harder to build websites with Java than with RoR, but if you pass a certain (very unusual) level of traffic, you'll wish you'd made the extra effort; otherwise, you'll be glad you didn't. (Extra effort isn't free.)

If you get to the scale of twitter, and more importantly if you have written a real time messaging server with a web application framework, it doesn't matter which framework or language you started with as you're going to be completely rewriting your entire stack at some stage as different parts fail in order to deal with the load (unless you have an incredibly experienced team who has written a twitter equivalent before and scaled it to 15000 messages a second). There's no difference between ruby or python (or perl, or php) in that regard - they are all interpreted and relatively slow, which starts to matter at this scale. And also even if you had used java or c in the fist place, if you had an architecture not written with massive scale in mind, you probably wouldn't survive that growth without radical changes on every level of your stack.

Re ruby versus python, the popularity of rails is partly historical accident, partly that ruby is a nice language which doesn't get in the way and is ideally suited to this domain, and partly that rails is deals with lots of the basics of web development for you without getting in the way too much when you need to adapt it. None of that means ruby is better than python, but I'd disagree that people put up with ruby in order to use rails - it's a really nice language in its own right, but it is not highly performant (though it is getting better). For most websites of course, many of which can employ caching, that is a non-issue, even at large scale - witness the success of Wordpress in php which would not survive even modest loads without caching.




Yup, and from experience, you're going to end up rewriting big chunks of your stack multiple times. (In a previous life, I worked on a team that grew a Java-based SMS gateway from an initial design limit of 10 msg/s on a single box to 10,000+ msg/s sustained, replicated across a high-availability cluster.) Props to the Twitter team for pulling it off, because at volumes like that you start to get into seriously arcane stuff like JVM garbage collection tweaking, or otherwise a full GC that halts all threads of execution for 30+ seconds will create entire pods of fail whales.

http://www.oracle.com/technetwork/java/javase/gc-tuning-6-14...


python is not interpreted,it is compiled in bytecode just like java.


Yes sorry that was an over-simplification due to ignorance - Ruby 1.9.3 and Python are both compiled to bytecode now, but still tend not to do as well in speed comparisons to the Java VM (which perhaps has just had more effort on optimisation). So in that sense it is like Java, but slower - for most people that really doesn't matter, but for twitter with this level of traffic, it probably would. You can of course run Ruby on the JVM now too, but I think that came too late for twitter.

What I found interesting from another twitter blog post linked from the article was that they are actually running on a modified version of Ruby 1.8.7 REE, not Ruby 1.9.x as you might expect, so that must really skew their comparisons![1] Anyway, there are a lot of variables in a huge system like twitter, so boiling it down to just a problem with Ruby performance seems pretty simplistic (as you'd expect from the register), and I seriously doubt they could have avoided this kind of rewrite and refactor of their entire stack in any language when hitting this sort of scale. To me it doesn't say much at all about Ruby as a language or whether it is suitable for websites.

[1] http://engineering.twitter.com/2011/03/building-faster-ruby-...


> python is not interpreted,it is compiled in bytecode just like java.

Depending on the implementation, so is Ruby. The canonical MRI 1.9 compiles to bytecode and interprets it. But unlike python, it doesn't write the bytecode to disk. The loading of bytecodes has been disabled until a bytecode verifier is implemented.


But the bytecode is then interpreted.




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

Search: