Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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

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

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

Lutz Hühnken

October 23, 2015
Tweet

More Decks by Lutz Hühnken

Other Decks in Programming

Transcript

  1. Scala in Practice A pragmatic view on programming language adoption

    Lutz Huehnken - Solutions Architect, Typesafe, Inc. @lutzhuehnken
  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. I.Should a Pragmatist Care About languages? II.The Case For Scala

    III.Scala in The Real World IV.Scala Adoption Done Right
  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. 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. 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. 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
  8. I.Should a Pragmatist Care About languages? II.The Case For Scala

    III.Scala in The Real World IV.Scala Adoption Done Right
  9. 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. http://blog.goodstuff.im/just_another_java_library
  10. Jazoon - Scala in Practice 16 Communities: Java Internet Tech

    in Enterprises Mobile Java Android Java EE Spring
  11. Jazoon - Scala in Practice 17 Communities: Python Scientific Computing

    Data Science Python iPython Notebook NumPy SciPy
  12. Jazoon - Scala in Practice 18 Communities: Scala Reactive Systems

    Big Data Scala Spark Akka ScalaZ Functional Programming Typelevel (shapeless, cats, ..)
  13. Jazoon - Scala in Practice 19 The Case For Scala

    Expressiveness Productivity Scala OO Big Data! Communities Reactive! Java Eco System and Tooling FP
  14. I.Should a Pragmatist Care About languages? II.The Case For Scala

    III.Scala in The Real World IV.Scala Adoption Done Right
  15. 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)
  16. 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
  17. 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“
  18. 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.
  19. Jazoon - Scala in Practice 32 Morgan Stanley Rumors •

    Adoption is language - driven
 • Scala because of • Functional Programming • Flexibility (DSLs, Macros..)
  20. 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
  21. 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
  22. 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
  23. I.Should a Pragmatist Care About languages? II.The Case For Scala

    III.Scala in The Real World IV.Scala Adoption Done Right
  24. 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
  25. 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
  26. 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.
  27. Jazoon - Scala in Practice 48 Scala Caveats • There

    is no „Scala EE“. Yet.
 • But patterns are evolving.

  28. 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
  29. Jazoon - Scala in Practice 50 Scala Caveats • We

    can ≠ we should • Coding guidelines • See Twitter, Kafka, Spark..
  30. 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!