Live data from Hacker News

Twitter: From Ruby on Rails to the JVM [video]

ontwik.com

71–80 of 95 posts

Re: Twitter: From Ruby on Rails to the JVM [video]

#71

I was recently in a quandary over the choice of technology. I started RoR and I really like it. However I was concerned about long term implications of that choice. The thing that I am taking from this talk is that I shouldn't worry about that, right now. If and when I need to scale, I will have enough resources to make a better choice. Resources that I don't have right now.

Like Matz, creator of Ruby, said [1] - and if I didn't paraphrase I think it would lose part of its charm - :

"If you can make up a website that has a higher traffic than Twitter ... it's a great success of business ... so you have money ... so you're safe to hire the Java programmer to replace it. [laughs]"

http://ontwik.com/ruby/ruby-2-0-what-we-want-to-accomplish-i...

Re: Twitter: From Ruby on Rails to the JVM [video]

#72

Earlier quoted context omitted.

> So you can pretty much stick each one on it's own server with it's own database and it'll be fine. That is not a scalable solution. Yes, it'll get you up and running out of the box, but as you keep spinning up servers to host each store and it's database you'll have to keep adding exponential resources (hardware, software, meatware) to the problem and keep you from achieving economies of scale.

>Yes, it'll get you up and running out of the box, but as you keep spinning up servers to host each store and it's database you'll have to keep adding exponential resources (hardware, software, meatware) to the problem and keep you from achieving economies of scale. No, you'd be adding resources at a _linear_ rate relative to the growth of the customer base. The point about economies of scale is true enough but has n…

You're right; I'm becoming stupid in my old age.

Re: Twitter: From Ruby on Rails to the JVM [video]

#73

No one will ever be in the position of handling so much real-time data as Twitter is. The rest of us can just get on with it and stop trying to pre-empt situations that will probably never happen to us.

Many companies in financial sector handle similar workloads. I know a couple of HFT shops, they're all java.

Re: Twitter: From Ruby on Rails to the JVM [video]

#75

No one will ever be in the position of handling so much real-time data as Twitter is. The rest of us can just get on with it and stop trying to pre-empt situations that will probably never happen to us.

Many companies in financial sector handle similar workloads. I know a couple of HFT shops, they're all java.

For sure, I was meaning from the perspective of a startup. There's obviously existing industries where real-time data is big, but they don't tend to be web fronted serving hundreds of millions of users.

Re: Twitter: From Ruby on Rails to the JVM [video]

#76
post #25
post #16

Earlier quoted context omitted.

Shopify is still 100% ROR and we serve hundreds of millions of requests. You will be fine :-) It's a competitive advantage for us, we move faster then the rest of the market.

I'm actually really glad to hear it. Though, I wonder about the "rails doesn't scale" mantra, is that really more for active record? In your experience is active record the biggest out of the box bottleneck?

The issue they have doesn't seem to be scaling, in that RoR is scaling linearly. But if you have hundreds of machines, raw performance saves real money, which means RoR is maybe not ideal for massive deployments and the JVM languages give you more performance on the same hardware. Though unless you're working on a top 50 site I wouldn't worry so much.

Re: Twitter: From Ruby on Rails to the JVM [video]

#77

Many people seem to refer only the scalability (performance, that is) side of the argument but only few who actually pointed out the developer's productivity of choosing Scala and Java for Twitter situation. http://www.infoq.com/articles/twitter-java-use

Agreed. You can achieve very high productivity if you use Scala and Java properly.

Re: Twitter: From Ruby on Rails to the JVM [video]

#78

Earlier quoted context omitted.

I noticed that the people who have a strong distaste for Java are largely application-developers. In most cases, these developers usually just work with the available libraries or APIs to build a website backed by database (some of them are consultants that build similar apps over and over again). Back-end developers seem to (maybe?) prefer to use Java.

Where are you pulling your hunch from? If anything, most of the ruby & node developers came from the back-end world of Java. I know I'm one of these people. Backend java developers have to use configuration heavy IOC frameworks like Spring, Guice, Hibernate, etc, whereas most of these ideas can be emulated in a more flexible language like Ruby.

Guice is configuration heavy? That's the first time I've heard about that. The last time I used Spring, I only have to provide one applicationContext.xml file that contains the XML header (XSD stuff) and 1 line of configuration to inject _every_single_injection_required_for_my_app_

Things changed.

Perhaps I was misusing the word "back-end".

When I refer to app-developers, I'm pointing toward people who build web-apps using Struts, Spring, JEE, EJB (I see where you think that back-end means completely EJB/Service/Hibernate).

The non-app-developers seem to keen on building infrastructure around the Java ecosystems:

Hadoop, HBase, Cassandra, ZooKeeper, custom server using Netty or Apache Mina. Or even building platforms such as GWT, Android.

Re: Twitter: From Ruby on Rails to the JVM [video]

#79
Part of the problem is that any typical Web Application framework is ill suited to building a full real time system like Twitter.

I doubt their story would have been much rosier if had they gone with Spring MVC, Hibernate, and Oracle from the start.

The minute you start moving away from CRUD based application design and moving into SOA, you're already signing up for a significant rewrite, even if you stick with the same platform.

Re: Twitter: From Ruby on Rails to the JVM [video]

#80
post #50

I was recently in a quandary over the choice of technology. I started RoR and I really like it. However I was concerned about long term implications of that choice. The thing that I am taking from this talk is that I shouldn't worry about that, right now. If and when I need to scale, I will have enough resources to make a better choice. Resources that I don't have right now.

True that. Even LOLCODE can scale :) Twitter's problems are very specific to twitter - Mega throughput (~7000 Tweets per second) in realtime, sharded DBs requiring multiple connections etc. Ruby will give you a significant time to market advantage especially if you are a startup.

My understanding is that the particular scaling problem of twitter is high fanout through subscriptions. Receiving 7k messages per second and storing them in a database is actually fairly straightforward.
Post reply on HN