This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

5

Scala ain't scalable in the way you think: you really should read the Twitter developers interview about Scala/Java... Basically every time they had (real) scalability issues, they ended up removing Scala code and putting in correctly multi-threaded Java code (which, as has been pointed out here, is much easier to do in Java than in Scala). Scala is cool for proto-typing and writing unit tests and anything that doesn't involve "Real World" [TM] amount of data that said.
–
Tristan St.Nov 29 '10 at 22:16

@Webinator Do you have a link to the interview?
–
Aaron NovstrupNov 30 '10 at 1:48

Agree with Tristan St on scalability. Erlang is the leader of the pack in case of concurrent programming due to its ability to create processes in a minimal time. You just can't create 10000+ plus threads and interact it with each other in SCALA in the way as your think.
–
UbermenschJan 16 '12 at 7:11

3

@TristanSt. Nice spreading of FUD, that's absolutely not the basic take away I got from that interview. - "But for other parts we’ve just gone back to a traditional Java threading model. The engineer working on that, John Kalucki, just found it was a little bit easier to test, a bit more predictable. The nice thing was, it took minutes to switch code that was actor based over to something thread based. It was a couple of search and replaces. So it’s not so bad if actors fail you for whatever reason." Amazing concept - some things suite the actor model and some don't!
–
Derek LitzMar 17 '12 at 15:52

He is most certainly not referring to scalability from the perspective of performance!

The fact that he can claim that scala is as appropriate for quick'n'dirty scripting as it is for large-scale enterprise deployment is roughly as follows:

Scripting

Scala is great for scripting because its type inference and functional style make it both concise and great for slicing and dicing collections etc.

Applications

Scala is great for writing applications because it is a statically type checked language with some great features for working in both functional and imperative styles. Scala is compatible with Java and hence you can leverage an enormous ecosystem of libraries.

Enterprise Deployment

Scala compiles to bytecode and runs on the Java Virtual Machine, a stable system with great performance, when compared to (so-called) dynamically typed (i.e. untyped) languages. Again, the fact that it is statically typed means that refactoring is made much easier on large codebases.

Any supporting evidence for "statically typed means that refactoring is made much easier on large codebases"? Sounds more like a, "it depends", situation then a fact. The only thing I've seen typed languages offer definitively is they are easier for compiler writers to deal with.
–
Derek LitzMar 17 '12 at 15:22

This means, scalable is meant in terms of flexibility and expressiveness. You can create your own control structures. E.g. the actors frameworks is a library, but it looks like it uses language features.

This means that Scala will scale according to the needed abstraction, not necessarily in terms of "answering 1.000.000 requests in a second" (but Scala is here strong, too).

What limits Java's scalability in practice is not the JVM, it's the difficulty of writing correct concurrent code. Scala makes this easier through its support for functional programming, and the actor model.

Java can be very scalable when concurrency is easy, such as in web servers (each request is almost completely independant). But when it comes to parallelizing a single long-running task, it can be a real struggle to get right.

While Java doesn't have support for functional programming, this doesn't mean you can't use it in Java. Doing so can give you much the same scalability, though for more effort. A library which can help code.google.com/p/lambdaj
–
Peter LawreyNov 29 '10 at 13:29

2

The Scalability to which Scala owns its name is of the language, not of programs.
–
Daniel C. SobralNov 29 '10 at 14:30

The actors library is a good example of how Scala is scalable, but this example is not to do with concurrency: the actors API looks like a native feature with special operators (such as the ! message-send), yet really it is all just regular method calls.
–
Ben JamesNov 29 '10 at 13:39

Actor model help you to write scalable software without too much pain and without too much concurrency headache, isn't it ? so even if you don't see it when using Actors, concurrency as something to do with the actor model. Actor model aim to simplify concurrent computation, so why this example has nothing to do with concurrency ... I don't get your point here ?
–
Alois CochardNov 29 '10 at 14:01

No problem ! I now understand your point, I was only speaking about Scala libraries scalability and not about the language scalability/concurrency features itself. Thanks
–
Alois CochardNov 29 '10 at 15:24