views:

96

answers:

4

Hi all,

I have recently come across SCALA while going through the designs of twitter and linkedin. A part of the twitter and linkedin are being shifted to scala for scalability which where originally developed in RoR?

Does changing the programming language guarantee scalability? How exactly is this decided? Can there by any pre-planning on how to scale while designing the system?

Can anyone please give me some insights on this ?

Cheers.

+1  A: 

one simple counterexample: writing a web server in Assembly is for all practical purpose impossible.

However, I doubt that the reason for the shift is because Scala is more scalable than Ruby. I would expect both language to have similar scalability factor. The only reason I can think of why they want to move to Scala is probably to benefit from Java Virtual Machine; Java VM is very well-tuned and fast. All the while, Scala has a more expressive syntax than Java, and is generally a nicer language.

Lie Ryan
So, while designing the software is this taken into consideration?
JPro
A: 

Good scalability depends on good architecture (i.e. share nothing architecture), and bear in mind scalability =/= performance.

Also, since I can always show you how to design an unscalable system using any languages, therefore, no language guarantee scalability.

tszming
+1  A: 

This seems to be a typical instance of conflating coincidence and causality. Twitter changed their architecture, which solved their scalability problems. At the same time, they also happened to introduce a new programming language, but this doesn't mean that this was responsible for fixing their problems.

Twitter was originally envisioned as a CMS platform. So, it was architected as a CMS, with a database at the center. However, users didn't use it as a CMS, they used it as a messaging platform. A database is pretty much the worst case scenario for a messaging platform: a messaging platform needs a message queue at the center. So, Twitter wrote a message queue that complements their database, and that helped their scalability problems somewhat.

This message queue was actually written in Ruby. So, no Scala there. (BTW: the name of the language is Scala, not SCALA. It's not an acronym.)

This first message queue also had scalability problems. Not because it was written in Ruby, but because it was the first time that any of the developers had ever written a message queue. So, they wrote another message queue. This time, they had all the experience from the first message queue, so this one was better. And it happened to be written in Scala.

The reason why Twitter had scalability problems at the beginning was not because of Ruby, it was because there had never been a Twitter before, and nobody knew how to scale it.

The reason why it scales now, is because they learned how to scale it, not because of Scala. (In fact, large parts of Twitter are still implemented in Ruby. Others are in C++, and there's some Erlang, too, I believe.)

Architecture scales. Good languages can make it easier to find performance and scalability bottlenecks (by simply having less code to look through), and make it easier to do large scale architecture refactoring (again: less code), but ultimately, it's about the architecture.

Jörg W Mittag
Thanks for the info. In general while designing a software, do architects take scalability in to consideration? How exactly this is estimated?
JPro
A: 

Performance ≠ scalability. However, the faster your code performs speed-wise, the less machines/processors you have to purchase, and Scala is faster. Thus, I think you can forgive someone imprecisely saying that Scala is more scalable because it's less costly to scale.

Jacob