Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Scala in Practice at Jazoon Tech Day, Oct 23 2015, Zurich


Published on

A pragmatic view on Scala language adoption:
- Should a Pragmatist Care About languages?
- The Case For Scala
- Scala in The Real World
- Scala Adoption Done Right

Published in: Software
  • You might get some help from ⇒ ⇐ Success and best regards!
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Scala in Practice at Jazoon Tech Day, Oct 23 2015, Zurich

  1. 1. Scala in Practice A pragmatic view on programming language adoption Lutz Huehnken - Solutions Architect, Typesafe, Inc. @lutzhuehnken
  2. 2. I.Should a Pragmatist Care About languages? II.The Case For Scala III.Scala in The Real World IV.Scala Adoption Done Right
  3. 3. I.Should a Pragmatist Care About languages? II.The Case For Scala III.Scala in The Real World IV.Scala Adoption Done Right
  4. 4. Jazoon - Scala in Practice 5 Telling The Computer What To Do.. A programming language is for telling the computer what to do Any Turing-complete language can do that
  5. 5. Jazoon - Scala in Practice 6 .. vs. Building A Model Of The World The World is • People and things (objects) interacting which each other? • Described by laws of science and mathematics? • Based on logic?
  6. 6. Jazoon - Scala in Practice 7 Ludwig Wittgenstein (1889 - 1951) The limits of my language are the limits of my mind. 
 All I know is what I have words for. Image from Wikipedia
  7. 7. Jazoon - Scala in Practice 8 A. Expressiveness OOP Functional Programming Model Logic Programming
  8. 8. Jazoon - Scala in Practice 9 B. Productivity Managed Runtime / Garbage Collection > No Garbage Collection Strongly Typed & Static Type-Checking > Weakly Typed or Dynamic Type-Checking
  9. 9. Jazoon - Scala in Practice 10 C. Community
  10. 10. Jazoon - Scala in Practice 11 Pragmatic Language Choice Expressiveness Productivity Language Communities
  11. 11. I.Should a Pragmatist Care About languages? II.The Case For Scala III.Scala in The Real World IV.Scala Adoption Done Right
  12. 12. Jazoon - Scala in Practice 13 Scala unifies OO and FP
  13. 13. Jazoon - Scala in Practice 14 Scala leverages the JVM Eco System
  14. 14. Jazoon - Scala in Practice 15 Scala & Java For All You Know, It's Just a Java Library The customer asks "Where's the Scala part?" I answer "It's in this JAR file." He goes "But, your program is written in Scala, but I looked at the byte-code and it's just Java." I answer "It's Scala... but it compiles down to Java byte-code and it runs in a Java debugger and you can't tell the difference." "You're right," he says. So, to this customer's JVM, the Scala and Lift code looks, smells and tastes just like Java code. If I renamed the scala-library.jar file to apache-closures.jar, nobody would know the difference... at all.
  15. 15. Jazoon - Scala in Practice 16 Communities: Java Internet Tech in Enterprises Mobile Java Android Java EE Spring
  16. 16. Jazoon - Scala in Practice 17 Communities: Python Scientific Computing Data Science Python iPython Notebook NumPy SciPy
  17. 17. Jazoon - Scala in Practice 18 Communities: Scala Reactive Systems Big Data Scala Spark Akka ScalaZ Functional Programming Typelevel (shapeless, cats, ..)
  18. 18. Jazoon - Scala in Practice 19 The Case For Scala Expressiveness Productivity Scala OO Big Data! Communities Reactive! Java Eco System and Tooling FP
  19. 19. I.Should a Pragmatist Care About languages? II.The Case For Scala III.Scala in The Real World IV.Scala Adoption Done Right
  20. 20. Jazoon - Scala in Practice
  21. 21. Jazoon - Scala in Practice 22 Apache Kafka • Developed at LinkedIn
 • Typical use-case: central publish- subscribe log for integrating data between applications, stream processing, data ingestion (Spark, Hadoop)
  22. 22. Jazoon - Scala in Practice 23 Apache Kafka • 3x Intel Xeon 2.5 GHz processor (6 cores)
 • Three producers, 3x async replication • 2,024,032 records/sec
 • Three Consumers • 2,615,968 records/sec
  23. 23. Jazoon - Scala in Practice
  24. 24. Jazoon - Scala in Practice 25 It’s just too big right now to not mention it..
  25. 25. Jazoon - Scala in Practice
  26. 26. Jazoon - Scala in Practice 27 Twitter - may be not the role model for your company • Early adaptor, but highly customized • E.g. Twitter „Futures“ • Twitter-Stack (Finagle etc.) • Build system (Pants) • But • Performance / scaling problem solved • Scala going strong at Twitter for 6 years now • And with some impact - „Server as a Function“
  27. 27. Jazoon - Scala in Practice
  28. 28. Jazoon - Scala in Practice 29 Soundcloud
  29. 29. Jazoon - Scala in Practice 30 Soundcloud - a bit of history It was a phase of high experimentation, and instead of defining which languages or runtimes these teams should use, we had the rule of thumb write it in whatever you feel confident enough putting in production and being on-call for. This led to a Cambrian Explosion of languages, runtimes and skills. We had systems being developed in everything from Perl to Julia, including Haskell, Erlang, and node.js. [..] We have used Finagle for HTTP, Thrift, memcached, Redis, and MySQL. Every request to the SoundCloud platform is very likely hitting at least one of our Finagle-powered microservices, and the performance we have from these is quite amazing.
  30. 30. Jazoon - Scala in Practice
  31. 31. Jazoon - Scala in Practice 32 Morgan Stanley Rumors • Adoption is language - driven
 • Scala because of • Functional Programming • Flexibility (DSLs, Macros..)
  32. 32. Jazoon - Scala in Practice
  33. 33. Jazoon - Scala in Practice 34 UniCredit Rumors • Akka & externally driven
 • Very skeptical of Scala • Need for some scalable, real time event processing • SI chose Akka, Scala • Delivered under time & budget • Scala it is
  34. 34. Jazoon - Scala in Practice
  35. 35. Jazoon - Scala in Practice 36 Galeria Kaufhof • Driven by „epiphany“: We need to be a tech company
 • From standard software to build-your-own • Culture change - pure retailer to tech focus
  36. 36. Jazoon - Scala in Practice 37 Galeria Kaufhof JUMP!
  37. 37. Jazoon - Scala in Practice 38 Galeria Kaufhof
  38. 38. Jazoon - Scala in Practice 39 Galeria Kaufhof
  39. 39. Jazoon - Scala in Practice
  40. 40. Jazoon - Scala in Practice 41 Zalando • Magento -> Java -> Scala • Actually polyglot, autonomous teams • But must be on tech radar • Polyglot is great, but maybe not for everyone
  41. 41. Jazoon - Scala in Practice
  42. 42. Jazoon - Scala in Practice 43 Renault R-Link • Driven by Akka
 • Build by AtoS
  43. 43. I.Should a Pragmatist Care About languages? II.The Case For Scala III.Scala in The Real World IV.Scala Adoption Done Right
  44. 44. Jazoon - Scala in Practice 45 Scala Caveats For All You Know, It's Just a Java Library.. .. but it’s not! That may be true at runtime - but certainly not in development. Josh Suereth: This is an important point. Scala is not just a “Java++”. There’s a lot of depth to pull out of the language, and lots you can learn. It doesn’t take a lot to start, but it can be intimidating how much is out there. You need to be prepared for it to take some time to learn things
  45. 45. Jazoon - Scala in Practice 46 Scala Caveats sbt But once you get the hang of it.. define your Scala build in Scala. It’s actually a great tool
  46. 46. Jazoon - Scala in Practice 47 Scala Caveats Parts of the community But everyone I interacted with in the Scala community was super friendly and helpful. Disclaimer: Maybe Tony Morris is, too - I don’t know him and never met him. These „headlines“ are about all I know about him.
  47. 47. Jazoon - Scala in Practice 48 Scala Caveats • There is no „Scala EE“. Yet.
 • But patterns are evolving.

  48. 48. Jazoon - Scala in Practice 49 Scala Caveats • The power to split teams
 • Goes hand in hand with „We do, because we can“
 • Comp. Design Patterns
  49. 49. Jazoon - Scala in Practice 50 Scala Caveats • We can ≠ we should • Coding guidelines • See Twitter, Kafka, Spark..
  50. 50. Jazoon - Scala in Practice 51 So do what? •Introduce Scala! •What is your driver? Focus on that. •Give team time to learn, get trainings •Establish coding guidelines •Address and avoid split proactively •There will be along on the road •But it’s worth it!
  51. 51. Thank You Lutz Huehnken - Solutions Architect, Typesafe, Inc. @lutzhuehnken
  52. 52. ©Typesafe 2015 – All Rights Reserved