Scala-bility
martes 10 de septiembre de 13
Puzzle: what is on
the Y axis???
martes 10 de septiembre de 13
OMG, these
MHzes don’t grow
anymore :(
martes 10 de septiembre de 13
But imagine a
beowulf cluster of
these!!!
martes 10 de septiembre de 13
Is it possible to handle multiple
tasks and not suffer?!
martes 10 de septiembre de 13
DEMO
martes 10 de septiembre de 13
We do it for ages!
UNIX pipes connect parallel processes
easily:
* Deterministic
* Composable
martes 10 de septiembre de 13
Why is it so easy to be
parallel with *nix CLI?
Designed to be parallel from the ground up
Designed to be functional from ...
Pipe example in
Java
martes 10 de septiembre de 13
Are we there yet?
Reliability?
Availability?
Diagnostics?
Distribution?
martes 10 de septiembre de 13
Doing it in Java
built-ins
synchronize, volatile
Collections.synchronized*
java.util.concurrent
java.nio
fork/join
martes ...
High-level tools for
Java async
Camel
Spring Integration
GridGain
Akka
martes 10 de septiembre de 13
Today we cover
only two
Akka: you can stay in Java and
scale vertically/horizontally -
transparently
Scala: being function...
Scala: being
functional
High order functions
Immutable data
Referential transparency
Lazy evaluation
Recursion (RecursiveA...
Scala: if you’re
functional, you can be
parallel
import Math._
val r = 0 until 10000000
def f(x: Int) = log10 (pow(3,x *si...
Same JVM,
different languages
You don’t have to choose. You can mix
them in the same project.
martes 10 de septiembre de 13
Right guys to follow ...
Martin Odersky
Rod Johnson
Jonas Bonér
martes 10 de septiembre de 13
... they already
use it in
production
martes 10 de septiembre de 13
Links
http://www.slideshare.net/djspiewak/high-wizardry-in-
the-land-of-scala
http://www.forbes.com/sites/quentinhardy/201...
Upcoming SlideShare
Loading in …5
×

TCE introduction (scalability with Scala and Akka)

675 views

Published on

The intro talk for Tikal Community Event on September 2013. Intended to be a warm-up for the next lectures on Akka and Scala for creating applications which utilize modern multicore systems.

Published in: Technology, News & Politics
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
675
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
15
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

TCE introduction (scalability with Scala and Akka)

  1. 1. Scala-bility martes 10 de septiembre de 13
  2. 2. Puzzle: what is on the Y axis??? martes 10 de septiembre de 13
  3. 3. OMG, these MHzes don’t grow anymore :( martes 10 de septiembre de 13
  4. 4. But imagine a beowulf cluster of these!!! martes 10 de septiembre de 13
  5. 5. Is it possible to handle multiple tasks and not suffer?! martes 10 de septiembre de 13
  6. 6. DEMO martes 10 de septiembre de 13
  7. 7. We do it for ages! UNIX pipes connect parallel processes easily: * Deterministic * Composable martes 10 de septiembre de 13
  8. 8. Why is it so easy to be parallel with *nix CLI? Designed to be parallel from the ground up Designed to be functional from the ground up Autonomic composable units of execution martes 10 de septiembre de 13
  9. 9. Pipe example in Java martes 10 de septiembre de 13
  10. 10. Are we there yet? Reliability? Availability? Diagnostics? Distribution? martes 10 de septiembre de 13
  11. 11. Doing it in Java built-ins synchronize, volatile Collections.synchronized* java.util.concurrent java.nio fork/join martes 10 de septiembre de 13
  12. 12. High-level tools for Java async Camel Spring Integration GridGain Akka martes 10 de septiembre de 13
  13. 13. Today we cover only two Akka: you can stay in Java and scale vertically/horizontally - transparently Scala: being functional allows to be parallel - easily martes 10 de septiembre de 13
  14. 14. Scala: being functional High order functions Immutable data Referential transparency Lazy evaluation Recursion (RecursiveAction, anyone?) martes 10 de septiembre de 13
  15. 15. Scala: if you’re functional, you can be parallel import Math._ val r = 0 until 10000000 def f(x: Int) = log10 (pow(3,x *sin(x))) val m = r. map ( f ) r. forall ( i=> f(i)==m(i) ) //10seconds r. par. forall ( i=> f(i)==m(i) ) //5seconds martes 10 de septiembre de 13
  16. 16. Same JVM, different languages You don’t have to choose. You can mix them in the same project. martes 10 de septiembre de 13
  17. 17. Right guys to follow ... Martin Odersky Rod Johnson Jonas Bonér martes 10 de septiembre de 13
  18. 18. ... they already use it in production martes 10 de septiembre de 13
  19. 19. Links http://www.slideshare.net/djspiewak/high-wizardry-in- the-land-of-scala http://www.forbes.com/sites/quentinhardy/2011/05/12/ names-you-need-to-know-scala-and-typeface/ http://www.slinnbooks.com/books/futures/ http://mandubian.com/2012/08/27/understanding-play2- iteratees-for-normal-humans/ martes 10 de septiembre de 13

×