News for hackers. Stuff that matters.
Re:Twitter jilts Ruby for Scala by jseifer on Wednesday April 01, 2009 @09:53PM (#542805)
"Investors now want to know that you're not going to be paying tons and tons of money for servers because you decided to build in a stack that isn't as efficient as possible," he said.

I've never used Scala and I'm a Ruby dev but I'm still not sure I totally agree with that. Scala is probably great and very efficient but you probably don't need to be thinking at Twitter's level out of the gate.

Re:Twitter jilts Ruby for Scala by patio11 on Thursday April 02, 2009 @07:25AM (#543183)
Some of us have business models which do not require traffic the size of nation states and, accordingly, aren't exactly that intensive on the computational resources.

My side business runs off of a $20 a month VPS. My day job routinely charges millions for software that runs on one to three commodity boxes.

You'll forgive me if I don't consider "Has difficulty running Twitter" to be a knock against a language. I don't, after all, have to run Twitter.

Re:Twitter jilts Ruby for Scala by tptacek on Wednesday April 01, 2009 @10:11PM (#542815)
It's also the case that headcount is far more expensive than servers.
Re:Twitter jilts Ruby for Scala by rcoder on Wednesday April 01, 2009 @11:33PM (#542870)
A really talented sysadmin with good tools may be able to manage 100 servers; a great developer can optimize your algorithms to get an order-of-magnitude reduction in the number of servers you need.

Eventually, more servers == more headcount.

Re:Twitter jilts Ruby for Scala by tptacek on Thursday April 02, 2009 @12:19AM (#542902)
No other implication about Scala intended (Alex is very credible), but optimizing for lower hardware footprint at the expense of your hiring pool (by choosing a very niche language) seems like a bad trade.

Won't every new developer who works on this codebase lose a week to two weeks becoming facile in Scala? Assume a 6 person dev team, and a conservative fully loaded $180k for a valley dev, and that's $43,000 out the window.

Re:Twitter jilts Ruby for Scala by rcoder on Thursday April 02, 2009 @02:08PM (#543766)
Once upon a time, people made the same comments about Ruby and Rails: "it's a fringe language", "the tools are immature", "you shouldn't use it because you can't find Ruby coders", etc., etc.

I find it honestly hilarious to hear it suggested that one of the early high-volume Rails shops should stick with "safe" language choices because they won't be able to hire enough developers to work with a new language.

I've read through the sources to Kestrel, and found them quite easy to grok. If anything, most real-world Scala code seems to be essentially very clean Java, with much of the syntactic cruft (redundant type declarations, inner classes, 'public static final' declarations, etc.) removed. Any experienced, effective developer is going to spend far more time getting to know your in-house APIs and coding style than they are the language.

Re:Twitter jilts Ruby for Scala by tptacek on Thursday April 02, 2009 @02:16PM (#543785)
Again: not an anti-Scala person, just turning the economics of this around in my head. That said:

Ruby is our house language. We've never hired anyone that came in the door knowing Ruby. We have a very high bar for hiring (typical first project: "write a programmable symbolic debugger for closed-source binaries on platform Y"). It takes people at least a week to become facile with Ruby --- a famously easy language to learn. Reading isn't writing.

If you have a house style, easily figure another week to pick up the right idioms, so that your code survives in the repository and isn't just refactored out.

Re:Twitter jilts Ruby for Scala by silentOpen on Thursday April 02, 2009 @01:20AM (#542949)
How big is the codebase for twitter? Are you limited by devs or production resources?

You can also swap in Java components when you need to so, depending on the architecture, you may only need a small Scala team. Java devs are everywhere. You also win by acquiring easy access to Java libraries.

Not saying Scala is the right choice... but there are big advantages besides "Scala is lighter than Ruby" -- and Scala is a lot lighter.

Re:Twitter jilts Ruby for Scala by jonknee on Thursday April 02, 2009 @10:45AM (#543382)
But their move to Scala meant the Fail Whale went away and their investors were happy enough to sink many more millions into the company. Would it be possible to run a high-volume messaging system in Ruby? Perhaps. But why fuck around when the people bankrolling your company are getting angry?
Re:Twitter jilts Ruby for Scala by tptacek on Thursday April 02, 2009 @01:15PM (#543649)
Hey you know what? Not making a case for Ruby here. Just picking one very small part of Alex's argument and critiquing it.
Re:Twitter jilts Ruby for Scala by donal on Thursday April 02, 2009 @02:53PM (#543848)
It might cut down on the volumes of resumes, but once culled down to actual potentials, I think the effect of the "niche language" is minimal. I spend my time hopping between a bunch of languages and I'm equally mediocre in all of them, but my friend who does the same is amazing in whatever language is thrown at him. I have yet to meet a really excellent programmer that can only program in one language (they might not be equally proficient in all of them).

When hiring for the small percentage of excellent programmers, I don't see language as a barrier. Sure, there will be spin up time, but you'll have that regardless. No one is experienced with every library, framework, or configuration. Adding in a new syntax might compound the issue, but I think that there is the definite potential for long-term productivity gains once the team is up to speed.

Re:Twitter jilts Ruby for Scala by dkarl on Thursday April 02, 2009 @01:28PM (#543675)
On the other hand, using an elegant, smooth, well-designed language like Scala is a perk that helps you hire excellent devs for less money. Plus, if you want to transition a bunch of experienced Ruby devs to a faster language without losing most of them, you'd better not pick Java or C++.
Re:Twitter jilts Ruby for Scala by tptacek on Thursday April 02, 2009 @01:37PM (#543695)
That's kind of a straw-man argument, isn't it? Nobody is moving from high-level languages back to C or even Java. The talk here is of moving from "early adopter" to "innovator" on the adoption curve. And I'm just making the point that when you do that, you necessarily either contract your candidate pool, or add ramp-up overhead to new hires.
Re:Twitter jilts Ruby for Scala by dkarl on Thursday April 02, 2009 @02:11PM (#543774)
I'm defending their choice to move to Scala (a "niche" language) after running into performance problems with Ruby. I don't think it's a straw man to mention Java and C++ as representative of the non-niche languages that perform significantly better than Ruby. There are plenty of faster language platforms they can move to, but which ones offer a powerful and elegant language? As far as I know, you either pick a "niche" language that few developers know or you pick an old and clunky language like Java or C++. In this case, you have to weigh the ability to hire new people, which would be better for the more popular languages, against the ability to retain your existing Ruby developers, which is better with an elegant, powerful language.
Re:Twitter jilts Ruby for Scala by Tichy on Thursday April 02, 2009 @02:10AM (#542973)
Still, I worry that despite Ruby's niceness, a lot of time is spent developing around it's issues. Whenever I read about deploying Ruby, it just sounds scary. Memory munching Mongrels that have to be restarted on a regular basis? It sounds like a science in itself, whereas tomcat just runs and runs and runs. Less headaches == less headcount.
Re:Twitter jilts Ruby for Scala by rcoder on Thursday April 02, 2009 @02:12PM (#543775)
If you know and like Tomcat, may I suggest you have a look at JRuby deployment for Rails apps? With recent versions of jruby-rack and the warbler gem, it's as simple as listing your dependencies in a config file, and then running 'rake war' from the top level of a Rails app to get a shiny new WAR file ready to drop into your Tomcat deployment directory.
Re:Twitter jilts Ruby for Scala by cageface on Thursday April 02, 2009 @12:12PM (#543534)
Thankfully these issues have been completely solved by passenger/mod_rails. Deploying Rails apps is now trivial and stability (at least outside of extreme loads) isn't an issue.
Re:Twitter jilts Ruby for Scala by erlanger on Wednesday April 01, 2009 @11:12PM (#542848)
I think that users care about speed as much as anything, and being fast cheaply is a competitive advantage.
Re:Twitter jilts Ruby for Scala by charlesju on Wednesday April 01, 2009 @11:17PM (#542852)
Having 2 RoR products in the time it takes you to build 1 Scala product is the true competitive advantage.
Re:Twitter jilts Ruby for Scala by rcoder on Wednesday April 01, 2009 @11:30PM (#542865)
Please read the original article. Nowhere in it (or the original talk) does Alex advocate using Scala instead of Rails for the things that Rails does well -- namely, interactive web page rendering.

Within that niche, Rails does a fine job. For infrastructure and middleware code, however, Rails has little to offer other than the Ruby language, which has serious issues when applied to time + memory-intensive problem domains.

I'm a huge fan of Ruby, and a (perhaps somewhat begrudging) user of Rails, but that doesn't mean I think they're the right solution to every problem.

Re:Twitter jilts Ruby for Scala by charlesju on Wednesday April 01, 2009 @11:37PM (#542874)
"The trouble, he insisted, is that the so-called Web 2.0 languages aren't always as efficient as they need to be, especially in an economic environment threatening to bring Web 2.0 to its knees."

I'm saying that is false, over-optimization is what brings startups to their knees.

Re:Twitter jilts Ruby for Scala by ankhmoop on Thursday April 02, 2009 @12:17AM (#542900)
Why is it "over-optimization" to use language with a genuinely well-implemented runtime?
Re:Twitter jilts Ruby for Scala by erlanger on Thursday April 02, 2009 @08:09AM (#543200)
If there's anything I've noticed over the years when building websites, it's that customers care a ton about speed. I'd argue that it's the most important feature, followed by design. The more responsive your interface, the better. Now, you shouldn't sacrifice key features to speed things up, and you shouldn't optimize your code from the get-go, but your product had better be fast.

Google won because of good search results, but I remember that the first thing about the search engine that impressed me when I first tried it in 2000 was its responsiveness.

Re:Twitter jilts Ruby for Scala by rimantas on Thursday April 02, 2009 @08:38AM (#543222)
Speed is very important. However: how much time does server spend running your Ruby code? I think I saw somewhere it is about 5% of the request time. There is DB, network latency, all the client side cruft (twitter did not get even assets caching right yet). Article says they are leaving Ruby in place for the front end, so most likely they do understand where bottleneck is, and where it has nothing to do with a language.

I just hope that other won't jump to porting their code without understanding the reasons. It should be pretty embarrassing to spend six month porting the codebase just to find out that reducing time server spends in your app code from 5% to 1% did not impact the overall speed of your site.

It would be interesting to see more details about those queue processing problems they have though.

Re:Twitter jilts Ruby for Scala by jonknee on Thursday April 02, 2009 @10:48AM (#543387)
But Twitter isn't a normal website and Ruby was the reason why it kept failing. That doesn't mean your website will fail because of Ruby, but Twitter had too much background messaging work for Ruby to keep up with. The fact that simply replacing the code with Scala made huge improvements should demonstrate that fact. They didn't change what was being done, just what language was doing it.
Re:Twitter jilts Ruby for Scala by charlesju on Thursday April 02, 2009 @10:56AM (#543402)
/agree the bottleneck for any website is ALWAYS the database, never the language. If you have requests that are bottlenecking at the language, nothing is going to solve that.
Re:Twitter jilts Ruby for Scala by erlanger on Thursday April 02, 2009 @08:45AM (#543226)
But we've already been over this: It's not Ruby, it's Rails that's slow.
Re:Twitter jilts Ruby for Scala by jrockway on Thursday April 02, 2009 @01:34PM (#543687)
http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...

Scala is 900x faster than Ruby for some workloads. Ruby is not a fast language. It works for web stuff because every language waits for IO as quickly as the others.