Earlier quoted context omitted.
I don't think so. Java outperforms JRuby, probably because of typing. See: http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...
Java probably outperforms JRuby primarily because the JVM was designed and tuned to run Java. But in any case, if Twitter's architecture is truly scalable then any intrinsic slowness of the language shouldn't be a big problem, because they can just toss more hardware in to compensate. What is a problem is a buggy VM that leaks memory. To run thousands of instances in a heavily instrumented way, the VM must be stable…
Twitter survives election after Ruby-to-JVM move
101–110 of 179 posts
Re: Twitter survives election after Ruby-to-JVM move
#102Earlier quoted context omitted.
If that were the case, they could have just run JRuby and avoided rewriting a bunch of code. The truth is, Scala is actually helpful with the architecture they came up with AND its great that it runs on the JVM.
I'm not necessarily disagreeing with you (static typed languages are going to be faster on the JVM), but JRuby - partially with the help of invokedynamic, added in Java 7 - has come a long way performance-wise since Twitter began their rewrite. I wonder if they would have done anything different, had JRuby been where it is now?
Re: Twitter survives election after Ruby-to-JVM move
#103Re: Twitter survives election after Ruby-to-JVM move
#104Re: Twitter survives election after Ruby-to-JVM move
#105Earlier quoted context omitted.
> because it's impossible to improve a programming language Well, since "improve" is a relative and a matter of taste, it is impossible to improve a language, isn't it? Make it run faster, and it will either take up more memory or be slower to develop with. Make it faster to develop with, and it will run slower or have some other tradeoff. Hence, "use the right tool for the job". And when your focus shifts from "quic…
Could you please tell me what fortran is the good tool for ? :) As much as I agree it's delusional to think one language may be adapted for virtually any kind of tasks, it seems way too much consensual to me to tell there is no such thing as bad or deprecated languages.
Also, Nastran got us to the moon (which is basically Fortran)
Re: Twitter survives election after Ruby-to-JVM move
#106Earlier quoted context omitted.
No. It is the JVM that should be getting the credit.
If that were the case, they could have just run JRuby and avoided rewriting a bunch of code. The truth is, Scala is actually helpful with the architecture they came up with AND its great that it runs on the JVM.
Re: Twitter survives election after Ruby-to-JVM move
#107Earlier quoted context omitted.
I'm not a Ruby developer, but I still can't help thinking, "WTF". No technology stack is perfect, but I've yet to meet a stack that was pure evil. There may be some cargo-cult personalities in the Ruby community, but, if there is, it's only because there is value in it. An infinitesimal number of sites have to deal with Twitter's scale problems. The rest can work on getting crap done instead of worrying about Maserat…
> No technology stack is perfect, but I've yet to meet a stack that was pure evil. As someone who has seen Ruby cause major problems I'd have to say it's not too far off "pure evil"
Re: Twitter survives election after Ruby-to-JVM move
#108Earlier quoted context omitted.
Java probably outperforms JRuby primarily because the JVM was designed and tuned to run Java. But in any case, if Twitter's architecture is truly scalable then any intrinsic slowness of the language shouldn't be a big problem, because they can just toss more hardware in to compensate. What is a problem is a buggy VM that leaks memory. To run thousands of instances in a heavily instrumented way, the VM must be stable…
Statically vs dynamically typed peformance difference is clear for virtually any static or dynamic language you care to name, it has nothing to do with the jvm being "tuned" for a language: http://shootout.alioth.debian.org/
Re: Twitter survives election after Ruby-to-JVM move
#109Re: Twitter survives election after Ruby-to-JVM move
#110Earlier quoted context omitted.
I work at Google :)
Then you should really know better than to make statements like "I think I could write a scalable Twitter in mostly Ruby. And I've never written a line of Ruby in my life."
Twitter has clearly engineered a working distributed system (or you would have read stories like "5% of Twitter users lost their tweets when our servers caught on fire last night"), so the fact that they wrote it in Scala or Java is largely irrelevant. They need fewer computers than they would have if they wrote it in Ruby again, and that's not something to discount, but I think it's technically possible to have a full Ruby stack do what Twitter does. And, they would have needed even fewer computers if they used C or C++. So it's clear that Java was a social choice (it had the right books, libraries, and stack of resumes) rather than an absolute must.
Besides, Ruby and Java both make the same C library calls to do I/O. So it all ends up being the same for everything except search, trending tweets, and other cpu-intensive analysis.