r/programming • • Nov 08 '12

Twitter survives election after moving off Ruby to Java.

http://www.theregister.co.uk/2012/11/08/twitter_epic_traffic_saved_by_java/
979 Upvotes

600 comments sorted by

346

u/[deleted] Nov 08 '12

Right tool for the right job. When Twitter was a new product, Ruby was a good choice. Now that they're relatively stable and need scalability, Java is a good choice.

204

u/[deleted] Nov 08 '12

Right tool for the right job, indeed. By which we mean, the initial dev team knew Rails, and could dive right in and get a product built. There's absolutely nothing wrong with that approach. In the case of a lot of startups, "the job" doesn't really mean "the product", it means "get something launched ASAP".

45

u/terrdc Nov 08 '12

A much better way to put it is that it was a good enough tool for the initial job. A language isn't a screwdriver.

2

u/[deleted] Nov 08 '12

Sometimes a screwdriver can substitute as a hammer though!

6

u/NikkoTheGreeko Nov 08 '12

After spending 6 years as a carpenter, and 13 years as an engineer, everything is a hammer.

→ More replies (2)

130

u/Plutor Nov 08 '12

Ruby on Rails was the right tool for the priorities then.

Java's the right tool for the priorities now.

Good for them for challenging their own comfort zone. I've been in too many jobs where a language/library/tool was stuck with for far too long because "we know it".

93

u/takaci Nov 08 '12

Is it me or are we all saying the same thing here?

52

u/Plutor Nov 08 '12

Maybe it's me, but I'm pretty sure we all agree.

19

u/eastsideski Nov 08 '12

WILL EVERYONE PLEASE STOP FIGHTING

→ More replies (1)

25

u/[deleted] Nov 08 '12

this

→ More replies (3)

12

u/[deleted] Nov 08 '12

Karma whores.

→ More replies (1)
→ More replies (3)

16

u/drb226 Nov 08 '12

I've been in too many jobs where a language/library/tool was stuck with for far too long because "we know it".

Plus, there's also the dreaded legacy code factor. We have so much legacy code in outdated framework Foo, we might as well keep writing the same kind of code. Just keep putting off the code overhaul until it is either completely necessary or completely impossible (or, in the disastrous case, both).

7

u/_pupil_ Nov 08 '12

"I'm in a deep dirty ditch and it's raining, obviously the thing to do is dig harder"

→ More replies (1)
→ More replies (1)

0

u/[deleted] Nov 08 '12

[deleted]

18

u/wzdd Nov 08 '12

I'd say Twitter is like more like an IRC in which a million people are each in 200 giant chat rooms rather than an instant-messaging service. I.E. it's a much harder problem than IM.

4

u/jonny_eh Nov 08 '12

Isn't it one giant chat room?

→ More replies (8)
→ More replies (1)

53

u/[deleted] Nov 08 '12

And Scala, java is used for search, not the backend bits.

4

u/pyraz912 Nov 08 '12 edited Nov 08 '12

Yup, I'm glad someone pointed this out. I think the OP, and the article itself, should be more accurately titled as a move from Ruby to the JVM, not just Java.

0

u/[deleted] Nov 08 '12

[deleted]

17

u/[deleted] Nov 08 '12

Scala is still scary and mysterious to many.

To be fair it does have a fairly steep learning curve.

14

u/[deleted] Nov 08 '12

Although the deeper mysteries of the scala type system may take a while to master, the language really isn't that hard to get productive in. If you want mutable state and for loops, scala is happy to give you them.

7

u/CookieOfFortune Nov 08 '12

Is there a link to what would be considered idiomatic Scala? There just seems to be too many features that are all just as easy/hard to implement that it's difficult to choose the best ones.

→ More replies (8)

14

u/misterrespectful Nov 08 '12

That may be the understatement of the year.

...before, I was like: "Oh yeah, Scala! Strongly typed. Could be very cool, very expressive!"

The... the the the... the language spec... oh, my god. I've gotta blog about this. It's, like, ninety percent [about the type system]. It's the biggest type system you've ever seen in your life, by 5x. Not by an order of magnitude, but man! There are type types, and type type types; there's complexity...

They have this concept called complexity complexity<T> Meaning it's not just complexity; it's not just complexity-complexity: it's parameterized complexity-complexity. (mild laughter) OK? Whoo! I mean, this thing has types on its types on its types. It's gnarly.

I've got this Ph.D. languages intern whose a big Haskell fan, and [surprisingly] a big Scheme fan, and an ML fan. [But especially Haskell.] He knows functional programming, he knows type systems. I mean, he's an expert.

He looked at Scala yesterday, and he told me: "I'm finding this rather intimidating."

→ More replies (13)

12

u/PasswordIsntHAMSTER Nov 08 '12

It's functional programming, anything you knew before is null and void.

31

u/clavalle Nov 08 '12

In Scala's case, anything you knew before is Null and Nothing.

→ More replies (13)
→ More replies (34)
→ More replies (14)

41

u/popthatcorn Nov 08 '12

Yep. And Ruby (and Rails) are still excellent tools for many jobs. Turns out, a lot of stuff will break when you start getting into Twitter traffic levels (or Reddit traffic levels, for that matter), but how many sites actually do?

42

u/mattgrande Nov 08 '12

The thing to remember is how much traffic you're realistically going to get. I've worked with devs who try to build the site to support Twitter/Facebook numbers, when realistically, it will have hundreds of users.

20

u/rseymour Nov 08 '12

In 1999-2001 I was in a startup that bought a jvm based web server and oracle to get their product going. With the sun servers they ran... We are talking over a million down right from the start. They could've gone LAMP from the start and never had a traffic issue. As it was they had to quit early. That is what you got when enterprise people wanted to do a startup.

20

u/NorthernerWuwu Nov 08 '12

To be fair, 99-01 was not exactly a time of great fiscal restraint for tech startups. Hell, I think we spent about a million on Aerons.

9

u/merreborn Nov 08 '12

In 1999-2001 I was in a startup ... They could've gone LAMP from the start

PHP 4.0 would have been 18 months old in 2001. MySQL 3.23 was released early 2001.

The LAMP stack wasn't terribly mature back then.

5

u/rseymour Nov 08 '12

Oh I know, MySQL didn't have proper transactions and php was gnarly (still is). But... ATG Dynamo was gnarly too.

Fun fact, I wrote (or copied from perl) the first ruby blog cgi script... in 2002.

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/39115

→ More replies (2)

14

u/LandSeaLion Nov 08 '12

But when they do they'll be ready, because it ought to be soon.

→ More replies (6)

7

u/bloodredsun Nov 08 '12

We do and that's one of the main reasons we use the JVM but you are right, most people should focus on using the tooling that is right for them right now.

The secret is to have an exit strategy from your fast-to-deliver-but-poor-performing tech into the better stack. Twitter chose SOA and event based systems, Facebook chose to turn PHP into a compile time monolithic C++ application. YMMV.

→ More replies (3)

11

u/evilmushroom Nov 08 '12

I like you. Not a mindless Java basher. ;)

10

u/WarWeasle Nov 08 '12

It's easy to bash Java. However, if it's the right choice after you do the research, then it's the right tool.

8

u/evilmushroom Nov 08 '12

Yup.

It's easy to bash any language not used for the correct situation.

9

u/lkjasdflkjasdf Nov 08 '12 edited Nov 08 '12

How is Java better than Ruby in scalability? (I thought scalability depended mainly on writing good code). thanks!

Edit: real question. I don't use Ruby or Java (I'm just familiar with Java) and I've never worked on large traffic sites.

5

u/2Xprogrammer Nov 08 '12

To whoever downvoted this, s/he was asking a neutral question, not challenging the claim. As someone not terribly familiar with Ruby, I would also be interested in a summary of why java scales better.

2

u/el_muchacho Nov 08 '12

Because:

  1. Ruby is monothreaded because of the global interpreter lock. Note that the standard Python interpreter has the same problem.

  2. Ruby is much more dynamic than Java, making some ptimisations impossible.

  3. Ruby isn't compiled, at best JIT compiled, so that whole program optimisations are not possible.

→ More replies (2)

2

u/green_transistor Nov 08 '12

Ruby, in its vanilla implementation, has the Global Interpreter Lock problem. In fact, Ruby scales pretty bad and JRuby is considered a better alternative for deployment.

1

u/BenRogersWPG Nov 10 '12

Exactly. When developing for something smaller than Twitter, I'd prefer Ruby.

1

u/dsk Nov 08 '12

When Twitter was a new product, Ruby was a good choice.

Really? I mean, Ruby syntax is nice, but it's not that much better that it's worth a rewrite later. I suppose Twitter didn't realize how big it was going to get.

→ More replies (1)

1

u/Seeders Nov 08 '12

Why is java better than ruby for them now?

1

u/eligundry Nov 08 '12

IIRC, Google followed a roughly similar path as Twitter. The original Google Crawler was written in Python and it was only in the last few years did they have to completely transition to Java to handle that type of scale.

9

u/2oosra Nov 08 '12

What exactly is it about Java (or JVM) that allows it to scale where Python and Ruby fail?

4

u/eligundry Nov 09 '12

A big part of it has to do with static typing. The reason why, IMHO, languages like Python/Ruby are so fun to use is that you don't really have to know what type a function will return or explicitly declare what type a variable is. Instead, that type is inferred and assigned dynamically. This is awesome, because it makes development much easier/faster. The downside is that it's inefficient. Every time a variable is declared or a function returns a value, that type and it's subsequent member variables and functions must be "attached".

Compare this process to a lower level language like C/C++/Java. Because each function explicitly states what type of value it will return and each variable's type is cast when it's declared the computer doesn't have to figure out what type this value is. This saves CPU cycles and memory.

Furthermore, with a lower level language, you have more granular control over how memory is managed. With a scripting language, often times a garbage collector is used to free up stuff from memory that is no longer needed. Often times, this memory that could be freed up sits for a while before it is available. Not so with a lower level language. If you're working with C++ objects, that memory will be unavailable unless you write destructors and delete unneeded member variables.

Bottom line: having complete control over how a program controls itself is a huge responsibility. Yes, you can make your program faster with a lower level language and proper use of best practices, but is it worth it is your load doesn't demand it? Why not take the simpler route and not worry about that stuff and make awesome things and worry about scaling when you get there?

→ More replies (1)

-11

u/stesch Nov 08 '12

Maybe Ruby was a good choice, but Ruby on Rails wasn't. Twitter is broadcasting and not a CRUD app.

31

u/jzelinskie Nov 08 '12 edited Nov 08 '12

What? Twitter is usually the first example application in every RoR book/tutorial because it is a CRUD app for only one model: tweets. It also makes a lot of sense that they'd use Scala for its modern feature-set and Java for their most performance-critical code, since seasoned Java vets can know exactly what bytecode will be generated by their code as they write it, whereas Scala can be tricky in that sense.

4

u/[deleted] Nov 08 '12

They use Java in the search engine, Scala in the backend

From 2011:

Last year the company announced that both its back-end message queue and Tweet storage had been re-written in Scala

As part of the effort, Twitter changed the search storage from MySQL to a real-time version of Lucene. More recently the team announced that they were replacing the Ruby on Rails front-end for search with a Java server they called Blender.

2

u/yaus831 Nov 08 '12

In that sense then most applications are some kind of CRUD app. I think I read some article before that one of the early mistake twitter made is think of it as some kind of CMS application, while it was actually more a messaging/broadcast/subscription application. I cannot find that article anymore thou'

2

u/[deleted] Nov 08 '12

They use Java for their backend? Really, I thought it was Scala.

4

u/djork Nov 08 '12

Ruby has some fundamental issues at scale, particularly the fact that it's still unable to do multicore concurrency.

→ More replies (3)
→ More replies (25)

60

u/[deleted] Nov 08 '12

I'm curious...is it still correct to say they're using "Java" when they're using Scala? Does using the JVM count as using Java?

5

u/rabidcow Nov 08 '12

Is it correct to say that Android is using Java?

→ More replies (5)

10

u/BeforeTime Nov 08 '12

It's a matter of definition I'd say. When it comes to performance it is mostly the JVM that counts rather Scala or Java. And often, when people talk about Java they include some of the technology stack including the language.

6

u/spotter Nov 08 '12

Is their stack Scala only? Because if they're using Java libraries (main selling point of JVM as eco-system for non-Java languages), then I'd say they're using Java.

→ More replies (2)

2

u/rjcarr Nov 08 '12

I say yes. The JVM is doing the heavy lifting regardless of what language is being used. If another language was used instead with Ruby's VM (if that is even possible, probably not) then it would have still failed.

When they say "java" they mean the java runtime ... the language that uses the runtime is mostly irrelevant.

2

u/[deleted] Nov 08 '12

Absolutely it does.

3

u/ryeguy Nov 08 '12

How do you figure? If you were using clojure you would go around saying you use Java, just because it's on the JVM? I know the twitter actually does use java, but I assume you were answering the parent's question.

→ More replies (3)

1

u/pamplemouse Nov 08 '12

There's two parts. The programmer productivity comes from the language & tool choices. So in that sense, it's important to point out it is Scala. The runtime, libraries and infrastructure relies on the JVM and Java type system. So in that sense it is Java/JVM.

→ More replies (12)

210

u/sopvop Nov 08 '12

TwitterMessageSearchResultVisitorMapperClassFactory

51

u/ponton Nov 08 '12

...Exception

49

u/[deleted] Nov 08 '12

...FactoryFactory.

26

u/[deleted] Nov 08 '12

This joke on Java is pretty boring. Back when Google code search was still up, the only hit for FactoryFactoryFactory was C++ code

→ More replies (2)

10

u/nickguletskii200 Nov 08 '12

Doesn't even follow naming conventions...

Try to keep your class names simple and descriptive.

7

u/aceofears Nov 08 '12

Also there's no clean way to stick to 80 columns of code per line with this.

→ More replies (7)

25

u/cc81 Nov 08 '12

You should make it Abstract

10

u/[deleted] Nov 08 '12

...Impl

1

u/gargantuan Nov 11 '12

But how do control its creation? Clearly we need a:

TwitterMessageSearchResultVisitorMapperClassFactoryFactory

1

u/arnthorsnaer Nov 08 '12

assFactory

5

u/vbullinger Nov 08 '12

I don't like to shorten words in my variable/method/class names, but I make exceptions for anything like "association."

5

u/PassifloraCaerulea Nov 08 '12

At work, our scientists write a lot of code to do "analysis". Think about it for a minute :) Definitely good for the lulz

→ More replies (2)

1

u/ryosen Nov 08 '12

Right, because Java is the only language where a developer could use a really long name for a class.

0

u/[deleted] Nov 08 '12

[deleted]

51

u/spupy Nov 08 '12

Is this serious?...

→ More replies (6)

29

u/[deleted] Nov 08 '12

I think a lot of Nimbus classes are synthetically generated, not hand-coded. That's probably how that name came into being.

15

u/zalifer Nov 08 '12

That is amazing.

10

u/I_Fuck_Hamsters Nov 08 '12

Why isn't that just called InternalFrameTitlePaneMaximizeButtonPainter?

46

u/maushu Nov 08 '12

Because that would be the painter of the maximize button for the title pane in the internal pane.

InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter is the painter for the maximize button in the title pane of the internal frame of the title pane of the internal frame of the internal frame.

The two are completely distinct.

6

u/oridb Nov 08 '12

To be fair, this code is autogenerated.

→ More replies (1)

15

u/bureX Nov 08 '12

This should be lawfully considered to be the raping of camelCase.

3

u/[deleted] Nov 09 '12

InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter internalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter = new InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter(ctx, state);

Oh god..

2

u/rabidcow Nov 08 '12

Now I want to use a haiku as a class name.

→ More replies (11)

7

u/s1337m Nov 08 '12

can anyone describe the technical details as to why ruby is slower than java

7

u/ais523 Nov 09 '12

Probably the #1 reason is just that people have had much longer to optimise Java implementations than Ruby implementations.

The main technical reason is that Java has rather less flexibility to change what code means; Ruby allows you to monkey-patch everything, whereas Java is rather inflexible. This can make coding in it more difficult, but it also allows optimisers to assume that things won't change out from underneath them, meaning more aggressive optimization is possible.

2

u/TurplePurtle Nov 08 '12

I'm not an expert on these things, but I believe one of the big things is that Java uses a JIT compiler, while ruby is interpreted. A JIT compiler can perform optimizations on the go. Also, Java being statically typed allows for optimizations not possible in Ruby's dynamic typing.

66

u/[deleted] Nov 08 '12 edited Nov 08 '12

Wise move, the JVM is a much more mature technology than the Ruby VMs. (I make a living writing Ruby code, and I absolutely hate the Java language, but the JVM is just an extremely advanced technology.)

I'm wondering, though:

  1. Did they try JRuby first, to see if they could scale on their then-current code by using the JVM?

  2. If you're going to rewrite major critical parts in a different, better-performing language, going for Java seems a bit half-assed — did they consider going for a C++ instead?

57

u/[deleted] Nov 08 '12 edited Nov 08 '12

I cant believe what a flame war this question turned into.

The only real answer to question number two is that Java probably made more sense than C++ when you optimize for development man-hours. Developers are very expensive and servers are pretty cheap.

C++ provides a clear speedup when compared to java (sources: 1 2 3 4), and it can also be optimized to a greater extent. However, C++ is also a much more expensive language to develop in because you either have to deal with an entire class of bugs that java doesn't have to (memory related), or you use frameworks that negate some of the performance increase associated with the language. Even then, you're still probably going to end up doing more work.

16

u/defcon-11 Nov 08 '12

We use JRuby so we can get real threads, and it turns out that Ruby code, especially 3rd party gems, have a lot if issues when running multithreaded that cause serious headaches. Developers write code without thinking about the fact that someone might run in on JRuby .

→ More replies (3)

3

u/NikkoTheGreeko Nov 08 '12

That's why they should have used Forth. Weed out the useless engineers. Wut...?

5

u/SanityInAnarchy Nov 08 '12

The only real answer to question number two is that Java probably made more sense than C++ when you optimize for development man-hours. Developers are very expensive and servers are pretty cheap.

The weird part is that this is exactly the argument for Ruby over Java in the first place.

C++ provides a clear speedup when compared to java...

IIRC, it's on average something like 2x -- and falling, as Java gets faster. On the other hand, I can easily imagine C++ being more than twice the man hours, which would be a bad trade.

I can see Java being the sweet spot here, though I'm still skeptical -- but is that really the argument?

2

u/gilgoomesh Nov 09 '12

On the other hand, I can easily imagine C++ being more than twice the man hours, which would be a bad trade.

Speaking as a C++ video software engineer: 10 times longer development time for 2 times performance improvement is normally a hugely valuable trade. It depends how much you need the performance.

→ More replies (1)

3

u/[deleted] Nov 08 '12

Clearly the answer is to move to a C# stack and forget the whole deal.

3

u/SanityInAnarchy Nov 08 '12

Sarcasm?

Sorry, Poe's Law.

→ More replies (1)
→ More replies (4)

13

u/roerd Nov 08 '12

C++ provides a clear speedup when compared to java (sources: 1 2 3 4)

As far as I can see, your sourced all concentrate on single-algorithm benchmarks which aren't really relevant for the behaviour of full applications.

17

u/[deleted] Nov 08 '12 edited Nov 08 '12

Find better ones then. I'm unaware of any full applications which are identically written in more than one language. However, the google one would appear to be pretty defensible. If you read the introduction they are testing using quite a few standard library data structures to perform quite a few different things. This should reasonably approximate the interactions between objects.

That paper showed about a 2.5x nod toward c++ in the best case (for the JVM).

edit: I would direct your attention to this portion of their justification:

The algorithm employs many language features, in particular, higher-level data structures (lists, maps, lists and arrays of sets and lists), a few algorithms (union/find, dfs / deep recursion, and loop recognition based on Tarjan), iterations over collection types, some object oriented features, and interesting memory allocation patterns. We do not explore any aspects of multi-threading, or higher level type mechanisms, which vary greatly between the languages. We also do not perform heavy numerical computation, as this omission allows amplification of core characteristics of the language implementations, specifically, memory utilization patterns.

→ More replies (4)
→ More replies (5)

2

u/argv_minus_one Nov 08 '12

Um, there are global optimizations that C++ cannot do but the JVM can.

One problem I see with C++ is that the dynamic linker doesn't do much optimizing. There's no escape analysis to help a garbage collector, no automatically inlining calls to dynamically-linked library functions, and so on. Once the code is compiled, that's it—very little optimization is or can be done to it after that.

The JVM, on the other hand, can regenerate code whenever it damn well pleases, as long as it doesn't take too long, and without sacrificing the ability to dynamically load code. In code that is not transformed at all at runtime, some of these optimizations are only possible if the program is statically linked, which most programs aren't.

3

u/killerstorm Nov 08 '12 edited Nov 08 '12

I doubt that Twitter messaging backend really requires that much man hours. However, using C++ only makes sense if they hire 'guru' level developers: ones who know both low level stuff (like CPU caches) and high-level stuff (like advanced algorithms and data structures).

Maybe I'm missing something, but I don't see why messaging core would require more then a dozen of man-months. (Of course, assuming developers are really good.)

EDIT: Shit, I wrote man-hours instead of man-months.

6

u/[deleted] Nov 08 '12

Twitter handles in excess of 350,000,000 tweets in a day spread across 140,000,000 users. Also recall that a tweet is fully capable of being delivered to thousands, or hundreds of thousands, of users. Would you expect that the SMTPD only took a couple dozen man-hours? At that kind of scale there's going to be a great deal of work spend load balancing, optimizing, assessing security risks, maintaining database consistency, etc. That's just the shit i can think of off of the top of my head.

→ More replies (7)
→ More replies (2)
→ More replies (12)

8

u/djork Nov 08 '12

Re #2

When you compare Ruby to Java to C++, the C++ advantage is not so clear.

Java is 35X faster than Ruby, while C++ is "only" 44X faster.

So it's an issue of marginal returns. You get a massive gain with either choice, but you get lots of benefits from the JVM that aren't there with C++ (namely the class libraries, runtime safety, garbage collection, VM tuning, introspection/reflection, interop with other JVM languages like JRuby, Scala, and Clojure, etc. etc.).

5

u/Eirenarch Nov 08 '12

Don't forget that static typing allows for some optimizations that may help scale. I doubt JRuby would have Java/Scala performance despite the fact that it runs on the JVM. BTW I have a distant memory that they used JRuby to faciliate transition to Java but I may be wrong on this.

3

u/[deleted] Nov 08 '12

I think they came to realise that a web framework isn't an asynchronous messaging platform. They didn't re-write the entire Twitter stack in a JVM-bound language. The Rails front-end survived for a long time after they moved messaging over to the JVM.

My guess is, they didn't even realise they were building an async messaging app for quite some time.

→ More replies (1)

20

u/Shaper_pmp Nov 08 '12

If you're going to rewrite major critical parts in a different, better-performing language, going for Java seems a bit half-assed — did they consider going for a C++ instead?

Because, aside from start-up, the idea that code running on the JVM is generally slower than native compiled code is outdated and hasn't been accurate for several years.

Long story short, for long-running infrastructure services like Twitter uses, initial startup time is practically irrelevant, so the VM startup doesn't matter.

Moreover, a modern, decent VM like the JVM can generally run at around the same speed as compiled native code, because by using JIT compilation the VM can make specific optimisations for the current environment and processing that are impossible for a compiler that has to optimise for the "general" case (i.e., optimisations that will generally help on any hardware, any OS, any path through the program, etc).

20

u/G_Morgan Nov 08 '12

Yeah there are two real places where Java still loses over C++:

  1. Memory usage.

  2. Responsiveness for real time applications.

Neither of these are a real concern for Twitter.

6

u/sanity Nov 08 '12

Memory usage

Java uses more memory because this is the smart thing to do. Rather than releasing every piece of memory as soon as it's no-longer used, the garbage collector lets it build up and then releases a bunch of memory in one go.

You can tell Java to use less memory if you want to, and it will, but it will be less CPU efficient.

20

u/TinynDP Nov 08 '12

Its also overhead. Like every Java object has to store an extra 8 or 16 bytes of garbage collection and synchonization data.

→ More replies (3)
→ More replies (6)

42

u/[deleted] Nov 08 '12

Yes yes, and so they keep saying. I hear this argument a lot, and it boils down to this: Java (or C#, or insert whatever dynamic language here) may be slower at startup, and it may use more memory, and it may have extra overhead of a garbage collector, but there is a JIT (read: magic) that makes it run at the same speed nonetheless. Whenever some people hear the word JIT all the other performance characteristics of dynamic languages are forgotten, and they seem to assume JIT compilation itself also comes for free, as does the runtime profiling needed to identify hotspots in the first place. They also seem to think dynamic languages are the only ones able to do hotspot optimization, apparently unaware that profile-guided optimization for C++ is possible as well.

The current reality however is that any code running on the JVM will not get faster than 2.5 times as slow as C++. And you will be counted as very lucky to even reach that speediness on the JVM.

So I do understand simonask's argument... If they could've realized a 40x speedup (just guessing) by moving from Ruby to Java, why not go all the way to C++ and realize a 100x speedup? But then again, having JRuby to ease the transition seems a way more realistic argument in Java/Scala's favor :)

Some benchmark as backup: https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf

32

u/masklinn Nov 08 '12

Java (or C#, or insert whatever dynamic language here) [...] the other performance characteristics of dynamic languages are forgotten [...] They also seem to think dynamic languages

Java is not a "dynamic language" under any sensible definition of this term I've ever seen.

So I do understand simonask's argument... If they could've realized a 40x speedup (just guessing) by moving from Ruby to Java, why not go all the way to C++ and realize a 100x speedup?

I love how you assert everybody (other than you) forgets the costs inherent to JITs, but you have absolutely no issue ignoring the costs of using C++.

20

u/[deleted] Nov 08 '12

Java is not a "dynamic language" under any sensible definition of this term I've ever seen.

I agree. And neither is C#. I may sometimes be too agressive in this discussion, because within my company I sometimes hear people claim Python now has a JIT (PyPy) so it is also just as fast as C. But In my defense, I didn't say "or insert whatever other dynamic language" :)

I love how you assert everybody (other than you) forgets the costs inherent to JITs, but you have absolutely no issue ignoring the costs of using C++.

Of course C++ has other costs, but we were talking purely about performance here. When it comes to performance, the only downside of C++ I can think of is that the default memory allocator can be slow when you want to allocate many small objects, in which case you may wind up using a garbage collector after all. Even then, the ability to define your own allocation and garbage collection strategy is often a win when it comes to performance.

→ More replies (13)
→ More replies (2)

3

u/pipocaQuemada Nov 08 '12

How much faster/more scalable are distributed C++ programs vs distributed Scala programs? At a certain point, I'd assume that the features of your library for distributed computation (hot code loading, processes monitoring other processes and restarting them if they fail, etc. etc.) and their ease of use ends up mattering far more to the uptime and working of your program then a small constant factor of speed between language implementations.

8

u/EdiX Nov 08 '12

So I do understand simonask's argument... If they could've realized a 40x speedup (just guessing) by moving from Ruby to Java, why not go all the way to C++ and realize a 100x speedup? But then again, having JRuby to ease the transition seems a way more realistic argument in Java/Scala's favor :)

I suppose they think a 2.5x slowdown is a good price to pay for faster compile times, no manual memory management and no memory corruption bugs.

→ More replies (17)

2

u/SanityInAnarchy Nov 08 '12

I don't think this is quite what people are saying. Rather, it's that if you actually compare apples to apples -- say, a GC'd C++ app vs a Java app -- you're probably not going to find a huge difference.

Although there are some edge cases where a JIT compiler can do better than a native compiler, we don't have a lot of examples of this actually being the case in practice.

The current reality however is that any code running on the JVM will not get faster than 2.5 times as slow as C++.

Do you have a source for this?

Some benchmark as backup

Unless I'm reading it wrong, that's a very specific, unrealistic microbenchmark being considered. That doesn't make it useless, but it does make it suspect if you're trying to claim specific numbers.

7

u/djork Nov 08 '12 edited Nov 08 '12

any code running on the JVM will not get faster than 2.5 times as slow as C++

This is just false for vanilla Java, and even for dynamic languages on the JVM in crazy optimization cases.

If they could've realized a 40x speedup (just guessing) by moving from Ruby to Java, why not go all the way to C++ and realize a 100x speedup?

Try roughly 35X vs. 44X.

You really have no idea how fast Java is, do you?

→ More replies (2)
→ More replies (33)

3

u/killerstorm Nov 08 '12

C++ is much more flexible, you can really control each bit in memory and each CPU instruction with it.

And if all you do is glorified data massaging, that kinda matters. Messaging isn't computationally expensive, it all depends on what encodings, indirections and wrappers you use.

→ More replies (1)

4

u/Fenris_uy Nov 08 '12

that are impossible for a compiler that has to optimise for the "general" case (i.e., optimisations that will generally help on any hardware, any OS, any path through the program, etc).

If you are in production, you know what is going to be your environment and you should set your compiler with all the flags needed to that environment. Also you should choose your compiler based on that environment. If you know that you are going to be running on Intel, buy their god damn compiler, it so good that it hurts.

Not disputing the fact that the JIT helps a lot, but compiler flags are not the reason why it does.

2

u/finprogger Nov 08 '12

Because, aside from start-up, the idea that code running on the JVM is generally slower than native compiled code is outdated and hasn't been accurate for several years.

Depends on what you mean by "generally." Notice the game industry isn't flocking to the JVM -- because it's slow. You need good CPU cache performance for soft realtime apps, and Java doesn't let you control memory layout well.

→ More replies (1)

2

u/[deleted] Nov 08 '12

It's true that the JVM is more mature; but it's also fundamentally more difficult to create a VM as performant as the JVM for dynamic languages.

Although over a year old, this SO answer says that 1.9 is faster than JRuby anyway.

I thought tracing compilers might have made progress here, by observing what paths are actually taken (as a substitute for the guidance of static types), but it seems to be a very hard problem. e.g. the fastest JS engine (google's V8) isn't tracing. Then again, client browser workloads typically aren't as long-running as server loads, and startup time is much more important.

→ More replies (20)

10

u/inmatarian Nov 08 '12

According to this tweet from the DBA at Twitter, it was MySql that they're saying saved the day.

19

u/rockum Nov 08 '12

So the rumors of Java's impending demise is greatly exaggerated.

13

u/wayoverpaid Nov 08 '12

The JVM is way too good to give up on. The problem is that Java, the language, is a pain in the ass to develop on in anything resembling an agile process.

It makes a great language for a.) writing a higher level language in, like scala or JRuby and b.) implementing a highly performant solution to a known problem.

3

u/[deleted] Nov 09 '12

is a pain in the ass to develop on in anything resembling an agile process.

Yeah, I'm going to disagree with this assertion. I'm part of an agile team and we use Java with much agility, and even some dexterity. You appear to be conflating Java enterprise frameworks with Java, the language.

3

u/wayoverpaid Nov 09 '12

I'll take your word for it. I've found it much easier to re-write a bad implementation in Ruby than in Java. There may be ways to do it, but I've found that agile processes turn working in 10,000 LOC programs in Java from "unbearable" to "tolerable."

→ More replies (1)
→ More replies (1)
→ More replies (9)

8

u/[deleted] Nov 08 '12

I wonder if Mirah is still being worked on.

Speed of Java with Ruby like syntax. It looked like it had a lot of potential.

Linky Link

3

u/deedubaya Nov 08 '12

jRuby seems to be the hottness now, I think most of the focus has switched to it. Don't know for sure though.

2

u/[deleted] Nov 08 '12

I'm not 100% sure but I thought the guys working on Mirah are the same guys working on JRuby?

Either way, I really liked the concept of Mirah. I tried it out a few times a couple years ago and was surprised at just how speedy it was. Tis a shame it isn't more popular.

2

u/drb226 Nov 08 '12

Hey, I remember Mirah! I really liked the concept when I first heard about it, but it looks like progress is slow (though not quite dormant). I think at this point I'd put my bets on Scala instead.

2

u/erad Nov 08 '12

Mirah looked interesting... on a related note, Groovy 2.0 offers static compilation which ought to bring it up to Java performance levels (at the cost of losing Groovy's "loose" dynamic nature. And it will take some time to iron all the bugs out...).

→ More replies (1)

4

u/ShenLongDong Nov 08 '12

I wonder if python has the same limitations?

3

u/lambdaq Nov 09 '12

Instagram, Pininterest and reddit

2

u/Xykr Nov 08 '12

Depends on what the issue is. Python's memory management is said to be better and it scales pretty well (especially the asynchronous frameworks).

→ More replies (3)

11

u/Narrator Nov 08 '12

My personal opinion:

Java is faster, has native threads, and the garbage collector does not leak. This makes it really really good for high concurrency long running processes like message queues. It is also much easier to work with than C++ thanks to garbage collection, cross-platform compatibility and a great library ecosystem.

That being said, ruby is faster to develop in and less memory intensive. Ruby is probably the most productive language I've ever worked in. I use it exclusively for sysadmin scripting.

JRuby is almost viable but needs more community support and needs to be a lot faster than the Ruby VM.

2

u/argv_minus_one Nov 08 '12

The Ruby interpreter's GC leaks? Jesus.

2

u/[deleted] Nov 08 '12

That being said, ruby is faster to develop in and less memory intensive.

*citation needed.

→ More replies (6)

1

u/sshconnection Nov 09 '12

It's more memory intensive, but JRuby already is, in most cases, faster than CRuby. It also has native threads and no GIL.

11

u/Dagur Nov 08 '12

Now they have a problemFactory

18

u/[deleted] Nov 08 '12

They got 99 problems but creating them ain't one

2

u/bwrap Nov 08 '12

and problemFactoryFactory

2

u/beeskneecaps Nov 08 '12

is jruby still an option for scalability?

5

u/[deleted] Nov 08 '12

They started moving off Ruby in 2008, I'm not sure why this is news. What is news (to me) is that they went to Scala initially, and now it's a mix of Scala and Java. What does that say about Scala?

2

u/[deleted] Nov 08 '12

The news is that it has been tress tested and worked.

1

u/Entropy Nov 08 '12

That it integrates well with plain Java?

1

u/drb226 Nov 08 '12

What does that say about Scala?

Well, for one thing, the article says absolutely nothing about Scala, besides mentioning it in passing. I found this quite irritating; would like to know the details about why vanilla Java was chosen over Scala for portions of code.

→ More replies (1)

1

u/Paul-ish Nov 08 '12

We don't know. It could be hard to learn quickly for people used to a more imperative style, and hard to find devs with scala experience.

8

u/svmk1987 Nov 08 '12 edited Nov 08 '12

Honest Question: They rewrote their entire application? Isn't that.... wasteful?

37

u/masklinn Nov 08 '12

They didn't rewrite everything, they rewrote the backend. The frontend is still Rails.

And it depends what "wasteful" is used for. They originally used Ruby to iterate quickly and gain brainshare early on, then hit a scaling/perf wall and switched for more efficient (but generally slower to iterate) tools (after they got a better grasp of the problem space as well). You don't need to scale when you don't have users, and it seems their strategy worked rather well.

It's a pretty common recommendation (especially in the web-ish space, but not just there) to get to market early and improve/rewrite as needed when things reach their limit.

5

u/svmk1987 Nov 08 '12

Okay, so from a programming point of view.. when you said backend and front-end, you mean rails still handles view logic and most controllers, right? And java is probably used to manage their data?

8

u/masklinn Nov 08 '12

Yes, essentially, from my understanding. The frontend is the business of generating and displaying pages, the backend is the storage logic, the queueing and distribution of messages, the replication, etc...

2

u/[deleted] Nov 08 '12

Right. The models in this setup are all just abstraction layers to the new java API.

→ More replies (1)

16

u/pmrr Nov 08 '12

I'm sure they weighed the cost of the rewrite against the future benefits.

→ More replies (2)

6

u/[deleted] Nov 08 '12

Twitter isn't an application. It started out as a Rails app, and expanded. They didn't sit down and "re-write Twitter", it's simply evolved. They had no idea how much it would need to scale, they've evolved it as needed. I think the approach has been about as efficient as it could have been, given the number of unknown things involved.

5

u/[deleted] Nov 08 '12

Twitter - what you see of it - acts as a web-based client to the JVM-based Twitter API.

→ More replies (3)

3

u/bloodredsun Nov 08 '12

The initial prototype of Starling took 2 weeks. Once they saw the upside, it was an easy decision.

2

u/[deleted] Nov 08 '12 edited Nov 09 '12

Depends on how they rewrote it. They have a few options.

  • piece by piece, a db function here, a math function there

  • two systems in parallel, then cut over. users get a neat button to swap options to get used to things, and if they don't have time, revert it for 'now'

  • a new system and old system in parallel, users are migrated in batches, from old stack to new stack. they run separately

  • the new system is created and then everyone is swapped over in a big downtime event and, surprise, new thing

It likely depended on the situation, but the top three are done depending on the situation.

UI only changes are easy with the two systems in parallel option, if the back end can support two UIs. Your desktop email client can be like that. SMTP is SMTP. The first is VERY slow going, but has the highest stability, and least surprise. Great for general cleanup and performance tweaking. The third is awesome when your designs are so disparate, like the old and new MySpace. The functionality of everything is SO different, it'd be a mess to try and support both for everyone.

The last, is the easy way out mentally. Say there is an out of band event, say a company is being aquired, offices are moving, data centres are moving, the old software isn't working out etc.. It's easy to run and rerun migrations between systems until they are perfect, have an event and say, "Hey, this sucked. Here's something new!" It's very risky since new software is hard to do and doing it as a big thing requires a lot of commitment.

1

u/rockum Nov 08 '12

Corporations rewrite their applications all the time. I currently work on two projects that are rewrites. Our team is currently rewriting another one. After evolving over a few years, the effort of maintaining an application may become excessive so it's cheaper to rewrite now that the requirements are better understood than to keep dragging the old architecture around.

1

u/[deleted] Nov 09 '12

Marriage to your codebase can also be wasteful.

See: Reddit.

1

u/Acidictadpole Nov 08 '12

It was a good question that I would have up voted. But then I noticed that the content of your post was 30% question and 70% down vote complaining.

1

u/svmk1987 Nov 08 '12

Fair enough. Now that it isn't in the negative, I will edit it our and delete my rant :)

4

u/fredugolon Nov 08 '12

a stupid/misleading headline. twitter has been farming out most of it's difficult backend services to scala for some time now. what they really meant to say, and what they said later on in the article, is that they moved towards a JVM hosted language.

this is far from news. michael abbott lead this charge a few YEARS ago.

1

u/[deleted] Nov 09 '12

According to the article, they moved from just Scala to Scala and Java.

2

u/wadcann Nov 08 '12

During a single second at 8:20pm, Twitter users produced 15,107 new posts, Rawashdeh writes, and during the peak traffic period of the evening they generated 874,560 posts in a single minute.

Regardless of language, it really doesn't seem like 15k messages/sec should really be all that hard to deal with for a large service.

1

u/Xykr Nov 08 '12

The message passing itself surely isn't the big problem, data processing is (all the indexing and real-time stuff).

→ More replies (1)

1

u/bloodredsun Nov 08 '12

If you are doing something simple then no it's not. You can get this throughput fairly trivially with a single producer-single consumer in a single thread. Using something like the Disruptor you can do ~80 million operations a second.

The issue is that you are looking at a globally distributed set of 1.5 x 107 users with each being a producer to a unique set of consumers (calculated by graph traversal) that are themselves producers where none of the data is cacheable and the keywords produced by this ecosystem is searchable within 10 seconds on a system that should be resilient across machine failures across multiple-datacentres.

It really is that hard to deal with.

2

u/wadcann Nov 09 '12 edited Nov 09 '12

globally distributed set of 1.5 x 107 users

I would imagine that the cost of handling an incoming tweet wouldn't be a function of the number of registered users.

unique set of consumers (calculated by graph traversal)

I don't use Twitter, but I don't see why graph traversal would be required, unless you're just referring to processing the list of edges (feed->subscriber) directly attached to a node (twitter persona).

I vaguely imagine that the new_twitter and query_updates mechanism looks something like this:

new_twitter:

  • update logical timestamp on feed's last update

  • Add the entry to a queue to the indexer (and sure, it should support reasonable incremental updates).

  • Walk a list of followers on the feed that are actively-listening. Start pushing messages to them.

signin:

  • Add yourself to the active listeners list on your subscriptions.

  • Walk your list of subscriptions and make sure that your logical timestamp is up-to-sync with the lastest message on each feed, and pull those into your feed.

query_updates:

  • Check your queue. If you have new messages, pull 'em down. Constant-time if no messages; if messages are present, linear in the number of messages to pull down.

You can split up each of your collection of feeds and your collection of users across multiple machines; you probably have an operation that splits a particular machine into two so you can scale up with more servers when you want.

There's your core set of operations.

If you want durability, keep the operations idempotent and log each message on a machine before pushing it into this mass.

I don't think that you'd need much caching, but I don't see why anything there needs to be uncacheable.

As long as you're durably logging messages as they come in, and any writes later in the system are in-order, everything else there could suddenly burst into flames, and you wouldn't lose data. Nothing other than the logging system ever need stop operation to synch up with nonvolatile storage, either. You'd need an indexer for substring or whatever search that provides incremental updates. This should be a well-solved problem already. I suspect that there are plenty of existing incremental text indexers and probably people who specialize in this who have much fancier and more-sophisticated scalable incremental-indexing systems than I'd give in an off-the-cuff answer, but even if you wrote your own, I expect that you could do something like this and do just fine for something like Twitter:

index:

  • Run a rolling hash over the input text, byte-by-byte for each of window size 1..some reasonable maximum N, where N is the maximum keyword length you want to support. For each window size, have a distributed array indexed by the hash. Each element in each of these arrays is a skiplist of messages which hashed to this skiplist in the past. For each byte in the message, for 1 to N, advance the rolling hash. Look up the skiplist in the distributed array, and prepend a message reference into the skiplist. Insert is O(m×N×lg(k)), where m is the message size (small), N is the maximum keyword length, and k is the number of times this substring has shown up before. This is easy to parallelize — just split the distributed array across more machines.

search

  • For each keyword, hash the keyword and perform a lookup in the distributed array dedicated to hashes for window size the length of the keyword. That gives you a skiplist, ordered by newness, of messages that reference that keyword. You now have a skiplist for each keyword you were looking for, obtained in constant time. Place a cursor at the head of each skiplist. You perform a (probably partial...just the newest messages) intersect on the skiplists by taking the smallest message id (Target) present pointed to by a cursor and moving the cursors on the other skiplists back to the first entry they have that is older-or-equal-to Target. If you have all cursors pointing at the same message id, you add that to your list of results, and advance one of the cursors to the next element. Repeat.

  • You probably want to cache the results of your intersect operation as a skiplist itself; it can be reused the same way the other skiplists were used whenever the hashes in your query are a subset of the hashes in a query that is searching through messages aged between the newest and oldest message in your results.

→ More replies (2)

2

u/postmodern Nov 08 '12 edited Nov 08 '12

Why not JRuby? Now with 1.7.0, JRuby can fully leverage the new InvokeDynamic JVM instruction.

Also, the frontend is still Rails, the backend message queue is a mix of Scala and pure-Java.

9

u/mullsork Nov 08 '12

now

They started moving away from Ruby to Scala/Java in 2008. That's not now.

→ More replies (5)

1

u/erad Nov 08 '12

JRuby (and any other dynamically typed language on the JVM) is still orders of magnitude slower than Java (except when the workload is I/O-bound, as is usually the case for web/DB frontends).

1

u/vafada Nov 08 '12

But Java sucks yeah? And ruby is hip!

/s

→ More replies (1)

1

u/[deleted] Nov 08 '12

Thank God, I always wondered how can social network allow itself to be so slow most of the time. Even until recent every 3rd photo from twitter album was blank.

1

u/romnempire Nov 08 '12

is it just me or is this article conflating ruby and rails?

1

u/dorfsmay Nov 09 '12

Are there a lot of apps written in ruby with other framework?

→ More replies (2)

1

u/skidooer Nov 09 '12 edited Nov 09 '12

I don't think so, they just have a complex infrastructure with many moving pieces that is difficult to articulate in a short non-technical piece. It appears that API 1.1 is not written with Rails, which explains how the mobile client is able to access the data without touching any Ruby code, and how the article explains their move away from Rails. API 1.0 and the website itself still appear to be still running on Rails, as always, though.

→ More replies (1)

1

u/gc3 Nov 09 '12

I wonder how much higher it could scale if it were C?

1

u/[deleted] Nov 09 '12

Scale in which way? The amount of time it would take to add new features would scale upwards considerably.

-2

u/[deleted] Nov 08 '12

Can I just put a stupid question out there: Wouldn't something like a Node.js setup be perfect for twitter(small amounts of data often)?

Or am I missing what they are upgrading here?

56

u/mooli Nov 08 '12

All node.js would give you is exactly the same execution pattern they already have, but in a slower language, and without threads.

71

u/wierdaaron Nov 08 '12

But it would be Node! Node node node node! Yeah we're a Node house. We build that in Node.js. Have you heard of Node.js? It's kind of like Node.js but with more Node.js. You can come work here making awesome Nodes Dot Jayess but you need 3-5 years experience writing NODE because its such a hardcore node language for making node.js node nodes. Check out this NPM we build for Node using Node. We figured out a way to emulate Node using Node so we can Node our Node.js nodes using more node.

Please give me some VC.

18

u/BernardMarx Nov 08 '12

Best description of Node.js I have read

12

u/PasswordIsntHAMSTER Nov 08 '12

I've wanted to check out Node for some time but haven't, on the sole basis of comments like this.

→ More replies (2)

9

u/Mac-O-War Nov 08 '12 edited Nov 08 '12

I sure hope you're pairing node with nosql. You gotta nosql your clouds.

→ More replies (2)

3

u/drb226 Nov 08 '12

I'm not trying to preach Node here, but I have some questions about your accusations.

a slower language

First of all, languages are neither fast nor slow; it's the way you turn that language into runnable code that determines performance. Node uses V8, right? Is it really that much slower than the JVM?

without threads

First of all, are explicit threads needed? Or are you just expressing dislike for Node's callback-and-event-loop style? fwiw, you can apparently spawn child processes with Node.

Again, I have no interest in defending Node (and less interest, if that's possible, in defending Java). I just want to raise the level of conversation.

0

u/[deleted] Nov 08 '12

[deleted]

2

u/drb226 Nov 08 '12

In fairness, he seemed to pinpoint "small amounts of data often" as the performance niche for Node. (I have no idea if this is actually a correct classification of the Node niche.)

3

u/[deleted] Nov 08 '12

Just for the record. I'm a PHP mongodb guy(mostly) and have just looked into Node.js

→ More replies (3)

12

u/[deleted] Nov 08 '12

Big propoponent for node.js here: no it wouldn't. Node.js is advantageous in that the language is javascript and the libraries are shiny and new. If you're busting out a basic web service, it's good (and in this case it would work), but it doesn't scale the same way and there's a lot more work to be done for a major service like twitter, so rather than doing all that extra work by hand they went with a language that has the tools available already.

7

u/[deleted] Nov 08 '12

Thank you, that is the sort of thing I wanted to know.

2

u/skidooer Nov 08 '12 edited Nov 08 '12

Or am I missing what they are upgrading here?

They are largely upgrading the backend. In a really simple app, the backend is usually just a database. In more complex applications, the backend becomes more: Things like event queues, application logic servers, etc. They had used Ruby to build those services at one point in time.

By all accounts, the actual web pages are still served by Rails at Twitter. It is the stuff that lies beneath that layer that has been rewritten to run on the JVM (mostly Scala, but some Java). It might not be impossible to utilize node.js there, but that's not really what it was designed for.

→ More replies (2)

1

u/rseymour Nov 08 '12

Just chiming in with what I'm sure has been written here already. They couldn't have launched with Java from the start. They needed the 'agility' it makes sense to invest in a real infrastructure where they can keep everything that the design of the ruby did right, and fix all of the wrongs.

Personally, I haven't done web dev in ages, but I'm glad to see java work so nicely these days. Sure used to be hell.

7

u/kitd Nov 08 '12

Personally, I haven't done web dev in ages, but I'm glad to see java work so nicely these days. Sure used to be hell.

This is the thing. Many people base their opinions on Java on their experiences with things like early J2EE and Spring, which were famously overengineered (see all the usual jokes about AbstractSingletonClasspathFactoryBean, etc, etc).

There are some great libraries for Java now which do a really good job at making web development on the JVM really simple and lightweight. Even the new JEE stack is a breeze in comparison.

1

u/[deleted] Nov 09 '12

They couldn't have launched with Java from the start.

How do you know this?

2

u/rseymour Nov 09 '12

The twttr team was on the RoR team and they were using it at Odeo. They were familiar with it and it was easier for them to roll out and play around with.

It wasn't meant as a utter fact that no human could've done it, but the team's familiarity with RoR's MVC concepts (by virtue of developing the framework itself) allowed them to work on it quickly.

→ More replies (2)

1

u/SanityInAnarchy Nov 08 '12

A little misleading. They moved to the JVM first and Java second, not the other way around. Though it's curious that they don't seem to be using JRuby for what Ruby code they have left.

→ More replies (2)

1

u/kyru Nov 09 '12

Java, getting actual work done as usual

0

u/shevegen Nov 08 '12

"None of this will be welcome news to the army of fanatical Ruby developers who believe the language's syntax, its high developer productivity, and its overall philosophy far outweigh any performance disadvantage it might have compared to other languages."

Interesting for the author to state this on the one hand, yet on the other hand he wishes to ignore that Twitter DID use Ruby.

So at the very least, this is a success story that you can attribute to Ruby, for if Ruby would be an awful language, why would it have been used initially anyway?

Besides, not every company will generate as much traffic as twitter.

You should actually be concerned the other way around, for if Ruby would be faster, who would still use Java?

-1

u/[deleted] Nov 08 '12

If Twitter disappeared overnight would anybody actually notice or care?

3

u/myevillaugh Nov 08 '12

They would, but without Twitter, they'd have no way to express it.

→ More replies (2)