$30 off During Our Annual Pro Sale. View Details »

Scala Is The Next Scala

Scala Is The Next Scala

Kevin Webber, CEO of RedElastic, will discuss reasons why Scala will likely remain a specialized programming language, and why becoming The Next Java isn’t what the Scala community needs in order to continue fostering a vibrant community, culture, and ecosystem.

The Rule Of Least Power is the philosophy of using the least powerful technology capable of solving a given problem, which is the philosophy that lead to the development of modern generalist languages like Google’s Go. Even more profound are the changes to modern systems architectures; today, a modern system might be composed of tens or hundreds of discrete services. No longer do teams need to choose a single language to accomplish the difficult task of launching a production-grade system, now teams can be very specific about which language is best suited to an individual component of a system. These trends in software development takes the pressure off of Scala to become The Next Java, which gives the Scala community the opportunity to focus on the essence of what makes Scala unique, and why it might be the language of choice to leverage against the most exciting opportunities in your business.

Drawing on almost ten years of Scala experience, along with meeting hundreds of technology leaders who are using Scala on mission-critical projects, Kevin will draw on these experiences to discuss the past of Scala and where the language and ecosystem may evolve to over the next decade.

Kevin Webber

May 13, 2017
Tweet

More Decks by Kevin Webber

Other Decks in Technology

Transcript

  1. SCALA IS THE NEXT SCALA
    Kevin Webber
    Consultant & Founder @ RedElastic
    e: [email protected]
    m: medium.com/@kvnwbbr
    t: @kvnwbbr

    View Slide

  2. MY STORY
    ▸ Started exploring Scala in 2008 while at the Bank of Montreal
    ▸ Former Lightbend customer (2012-2014)
    ▸ Enterprise Architect & Advocate at Lightbend (2014-2016)
    ▸ Founded RedElastic in 2016

    View Slide

  3. THE LAST FIVE YEARS

    View Slide

  4. DISCLAIMER
    EVERYTHING I WILL TALK ABOUT IS AN OPINION

    View Slide

  5. 1. HISTORY

    View Slide

  6. Value is not
    STATIC

    View Slide

  7. Era Scala Java
    2008 2.7.x Java SE 6
    2010 2.8.x
    2011 2.9.x Java SE 7
    2013 2.10.x
    2014 2.11.x Java SE 8
    2016 2.12.x
    2017 (Q3) Java SE 9
    2018 (Q1) 2.13.x

    View Slide

  8. 2008

    View Slide

  9. WHY EVALUATE SCALA?
    ▸ Capital Markets (FX, wire transfers)
    ▸ Struggling with multi-threaded Java
    ▸ Struggling with clustered WebLogic
    ▸ Needed easier concurrency model

    View Slide

  10. Language features
    SCALA 2.7 JAVA SE 6
    REPL ✓ x
    Option ✓ x
    abbreviated syntax ✓ x
    lambda expressions ✓ x
    pattern matching ✓ x

    View Slide

  11. Ecosystem
    SCALA 2.7 JAVA SE 6
    Commercial support x ✓
    Tooling x ✓
    Hiring x ✓

    View Slide

  12. SUCCESS?
    REJECTED AS AN APPROVED LANGUAGE DUE TO:
    ▸ Lack of commercial support
    ▸ Lack of tooling
    ▸ Lack of experienced developers

    View Slide

  13. 2011

    View Slide

  14. WHY ATTEMPT TO USE SCALA AGAIN?
    ▸ Needed to build an advanced ecommerce platform with very few
    back-end developers
    ▸ A talk by Sadek Drobi at QCon New York brought Scala back to mind
    and introduced me to Play
    ▸ Built platform as a monolithic Play application, iterated over time

    View Slide

  15. Language features
    FEATURE SCALA 2.9 JAVA SE 7
    REPL ✓ x
    Option ✓ x
    abbreviated syntax ✓ x
    lambda expressions ✓ x
    pattern matching ✓ x

    View Slide

  16. Ecosystem
    SCALA 2.9 JAVA SE 7
    Commercial support ✓ ✓
    Tooling x ✓
    Hiring x ✓

    View Slide

  17. SUCCESS?
    APPROVED AS A LANGUAGE:
    ▸ Commercial support was available
    ▸ Technical leadership first approved Play and Akka
    ▸ Language choice was the last decision we made
    ▸ Viewed as a developer concern as long as it supported the JVM

    View Slide

  18. MEASURE, MEASURE, MEASURE
    ▸ The benefits of Scala with Play & Akka were measurable
    ▸ Had to support 5+ million page views per minute
    ▸ Zero downtime
    ▸ Small Scala team delivered walmart.ca in < 12 months
    ▸ Significantly bigger front-end team

    View Slide

  19. 2014

    View Slide

  20. Language features
    FEATURE SCALA 2.11 JAVA SE 8
    REPL ✓ x
    Option ✓ ✓
    abbreviated syntax ✓ x
    lambda expressions ✓ ✓
    pattern matching ✓ x

    View Slide

  21. Ecosystem
    SCALA 2.11 JAVA SE 8
    Commercial support ✓ ✓
    Tooling ? ✓
    Hiring ? ✓

    View Slide

  22. MOMENTUM
    ▸ At the beginning of 2014 tooling was still emerging
    ▸ The ecosystem has been maturing steadily (e.g, OpsClarity for
    monitoring)
    ▸ Many Scala success stories since: Intel, Verizon, Samsung,
    UniCredit, Walmart, Barclays
    ▸ Scala has gone from "underdog" to "enterprise approved"

    View Slide

  23. 2017

    View Slide

  24. Language features
    FEATURE SCALA 2.12 JAVA SE 9
    REPL ✓ ✓
    Option ✓ ✓
    abbreviated syntax ✓ x
    lambda expressions ✓ ✓
    pattern matching ✓ x

    View Slide

  25. The new features of Java 9
    ▸ Java + REPL (jshell)
    ▸ New HTTP Client /w HTTP 2.0
    ▸ Security improvements
    ▸ Improved immutable collections
    ▸ Reactive Streams (java.util.concurrent.Flow provides interfaces)

    View Slide

  26. OPTIONAL TO STREAM
    java.util.Optional.stream()
    List filteredList = listOfOptionals.stream()
    .flatMap(Optional::stream)
    .collect(Collectors.toList());

    View Slide

  27. A better Java is good for Scala
    2.12 ("COMPILER RELEASE")
    ▸ Java 8 (λ, SAM, default)
    ▸ New backend & optimizer

    View Slide

  28. The Scala ecosystem is catching up
    SCALA 2.12 JAVA SE 9
    SAST (HP Fortify) ✓ ✓
    Fast compilation ✓ (Hydra) ✓

    View Slide

  29. Value needs
    CONTEXT

    View Slide

  30. Force ranked priorities
    DEVELOPER MANAGER EXECUTIVE
    Syntax 1 3 6*
    Ecosystem 2 2 5
    Hiring 4 1 1
    Support 3 4 4
    Indemnity 6 2
    Terms 5 3

    View Slide

  31. Force ranked priorities
    DEVELOPER MANAGER EXECUTIVE
    Syntax 1 3 6*
    Ecosystem 2 2 5
    Hiring 4 1 1
    Support 3 4 4
    Indemnity 6 2
    Terms 5 3

    View Slide

  32. Force ranked priorities
    DEVELOPER MANAGER EXECUTIVE
    Syntax 1 3 6*
    Ecosystem 2 2 5
    Hiring 4 1 1
    Support 3 4 4
    Indemnity 6 2
    Terms 5 3

    View Slide

  33. Competing on syntax alone is a race to the bottom.
    Scala must compete on value.

    View Slide

  34. 2. OBJECTIONS

    View Slide

  35. WHY SHOULD WE CARE ABOUT
    OBJECTIONS?

    View Slide

  36. Cultures of total dedication look crazy
    from the outside, partly because the
    most notorious cults were homicidal.
    — Peter Thiel, Zero To One

    View Slide

  37. We need to understand objections so we can advise others in a rational,
    thoughtful way, not based on total dedication.

    View Slide

  38. EXECUTIVE OBJECTIONS
    ▸ "I hire smart people and get out of their
    way. I don't care what language they use."
    ▸ "What's the ROI of Scala?"
    ▸ "Scala has not been approved by our
    architecture team."

    View Slide

  39. OBJECTION HANDLING
    ▸ "Our use of Scala opened up hiring opportunities never before
    possible."
    ▸ "A small team of Scala developers can achieve significant
    productivity with very little code."
    ▸ "Scala is the language of choice in strategic domains."

    View Slide

  40. DEVELOPMENT MANAGER
    OBJECTIONS
    ▸ "Scala is difficult and only for the elite."
    ▸ "There are not enough Scala developers in
    the market."
    ▸ "Scala doesn't support [Maven, HP
    Fortify, etc]."

    View Slide

  41. OBJECTION HANDLING
    ▸ "We were able to recruit top-shelf Java talent that wants to expand
    their skills in functional programming by using Scala."
    ▸ "Scala is a JVM language, fully compatible with most Java libraries,
    and the ecosystem is very mature."
    ▸ "You can accomplish more with fewer developers."
    ▸ "You will unlock the full potential of your developers."

    View Slide

  42. DEVELOPER OBJECTIONS
    ▸ "We don't know [category theory, calculus,
    linear algebra, etc]."
    ▸ "Functional programming is terrifying!"
    ▸ "Scala is very unopinionated. I don't know
    where to start!"
    ▸ "I don't have time to learn a new language.
    I can do all of this in Java."

    View Slide

  43. OBJECTION HANDLING
    ▸ "You don't need [calculus, category theory, linear algebra] for
    business programming in Scala."
    ▸ "You can stretch yourself for library programming, though!"
    ▸ "Functional programming is strategic for your career; it's widely
    used in high-growth domains."

    View Slide

  44. 3. VALUE

    View Slide

  45. SCALA IS ACTIVE!
    ▸ Significant contributions by the open-source community
    ▸ Significant contributions by partners
    ▸ Releases average 2x per year

    View Slide

  46. View Slide

  47. View Slide

  48. COMPANIES DRIVING
    GROWTH

    View Slide

  49. Major companies want to see other major companies already invested in
    the language and ecosystem.

    View Slide

  50. Apple: hovering between 50-80 open Scala positions

    View Slide

  51. Coursera's Functional Programming in Scala
    specialization
    1. Functional Programming Principles in Scala
    2. Functional Program Design in Scala
    3. Parallel programming
    4. Big Data Analysis with Scala and Spark
    5. Functional Programming in Scala Capstone

    View Slide

  52. IBM's Big Data University

    View Slide

  53. 4. FUTURE

    View Slide

  54. SCALA IS WELL POSITIONED
    ▸ Cloud computing
    ▸ Data (big data, fast data)
    ▸ Distributed systems
    ▸ Modern architecture (Domain-Driven Design, CQRS, Event
    Storming)

    View Slide

  55. LIBRARIES AND TOOLS LEADING THE CHARGE
    ▸ Kafka (Confluent)
    ▸ Spark (Apache)
    ▸ Akka & Reactive Streams (Lightbend)
    ▸ Apache Gearpump (Intel)

    View Slide

  56. SCALA IS NOT THE NEXT JAVA
    ▸ Scala must continue to push functional programming forward
    ▸ Enterprises will continue to embrace Java given the closing gap in
    language features
    ▸ Enterprises will use Scala when and where it makes sense
    ▸ Scala and Java will continue to co-exist together (JVM, interop,
    ecosystem)

    View Slide

  57. SCALA IS THE NEXT SCALA
    ▸ Scala must always retain "first-mover advantage"
    ▸ Scala will push all developers to new heights in exciting domains
    like machine learning, AI, big data, and distributed systems
    ▸ Scala will continue to unlock the full potential of developers

    View Slide

  58. Summary
    ▸ Value is always in flux
    ▸ Being the next something is not aspirational
    ▸ Java will remain a popular choice for large enterprise projects

    View Slide

  59. Scala is the optimum choice for
    ▸ mission-critical projects, in
    ▸ strategic domains, with
    ▸ small teams, and
    ▸ modular architectures

    View Slide

  60. SCALA WILL NEVER THRIVE ON
    VOLUME

    View Slide

  61. SCALA WILL THRIVE ON
    VALUE

    View Slide