TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Once Again, Twitter Drops Ruby for Java

42 点作者 alexwilliams大约 14 年前

12 条评论

fleitz大约 14 年前
"That along with the news that Twitter has hired 25 more employees kinda tells that Java's code base is practically more maintainable than equivalent Ruby code"<p>Uhh if you need 25 more people that tells me that your code is less maintainable and you're writing much more of it. No one has ever debated that in raw execution speed Java is faster, the problem is that most startups have plenty of CPU and few devs.<p>Twitter really did things ideally, start on a rapid dev platform and then port to a faster platform after acquiring the userbase and capital infrastructure that makes such a decision make sense. I'm not sure that if I was working on the JVM that Java would be my language choice, I'd probably use Mirah/Clojure/Scala.<p>The extra 25 devs are probably to ensure T2EE (Twitter 2 Enterprise Edition) compliance and refactor their POROs (Plain old ruby objects) to work with their ETB middleware. /snark
评论 #2435462 未加载
评论 #2435459 未加载
评论 #2435478 未加载
评论 #2436611 未加载
theoj大约 14 年前
Once you increase the scale sufficiently, it's more cost effective to hire a team that makes the code run faster rather than add large expensive servers. This is what's happening now at Twitter.<p>It's not that Java is now absolutely 100% better than Ruby on Rails, it's just that Java is better for a site of that scale.
评论 #2435288 未加载
dasil003大约 14 年前
I shudder to think of CTOs basing high-level engineering decisions based on such content-less fluff.
评论 #2435531 未加载
评论 #2435258 未加载
评论 #2435244 未加载
laujen大约 14 年前
Twitter is beyond the scale of most businesses. This -- whether Scala or Java or PhP or RonR or Python -- is the best choice for our code base generating millions of hits per day is a problem many of us would love to have!
评论 #2435410 未加载
guelo大约 14 年前
I have no insight into Twitter's decision making, but the reason I recommend Java over the other popular languages comes down to readability and maintainability. In my experience the dynamic-ness of the language begins to work against maintainability and readability after a while, especially after the original designers hand off the project to other programmers. Most language communities have built over time best-practice guidelines for readability and avoiding common bugs. But I think Java's age and enterprisy culture have allowed it to evolve stronger guidelines (see Joshua Bloch's Effective Java), and it's limited flexibility make it easier to maintain.<p>If you are in a highly competitive startup environment where break-neck execution for the next 6 months to a year is a matter of survival then Java might not make sense, but that doesn't describe most projects.
评论 #2435375 未加载
评论 #2435527 未加载
评论 #2435394 未加载
grandalf大约 14 年前
This isn't a knock against Ruby. Java and Ruby are designed to solve different sorts of problems (though there is a lot of overlap). Twitter is not in the overlapping region.
评论 #2435424 未加载
noelwelsh大约 14 年前
Twitter is well known for using Scala. Although the article says Java, I'd like to know if this is the case (i.e. no Scala) or a simplification.<p>I've done more Java programming than a man ought, and now a fair bit of Scala. The JVM is fast -- far faster than the Ruby/Python/PHP VMs. Harnessing that power has been an issue, as Java is so inexpressive. I find with Scala I can write code as quickly as in any other language I've used. It makes a great combination -- code quickly and get quick code -- and as a result I don't see any use for RoR or other interpreted frameworks in my coding.
Groxx大约 14 年前
3x faster for the pain of Java? I'll stick with Rails until I have enough money to pay people to migrate for me.<p>edit:<p>&#62;<i>That along with the news that Twitter has hired 25 more employees kinda tells that Java's code base is practically more maintainable than equivalent Ruby code - at least when the code base is huge and the team size is large.</i><p>What? How does hiring more employees imply something is <i>easier</i>?
plinkplonk大约 14 年前
Interesting why they chose Java instead of Scala for this move. The last time they moved off Ruby they moved to Scala, not Java. Anyone at Twitter want to comment?
评论 #2438644 未加载
评论 #2436120 未加载
ChrisArchitect大约 14 年前
gah, this again eh. Friday's news. This is a pretty unique/upper tier end of the spectrum problem. They needed to be able to cope with the ridiculous amount of realtime indexing and searching going on around the SEARCH stack, so ok, Netty etc. Not really anything about abandoning Rails etc.
sgt大约 14 年前
When they say they are changing to Java, does this mean Scala, or do they actually mean the Java programming language running on the Java platform?
评论 #2438976 未加载
gulbrandr大约 14 年前
Please do not post links with utm junk in the URL.