Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

THE LAST FIVE YEARS

Slide 4

Slide 4 text

DISCLAIMER EVERYTHING I WILL TALK ABOUT IS AN OPINION

Slide 5

Slide 5 text

1. HISTORY

Slide 6

Slide 6 text

Value is not STATIC

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

2008

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

2011

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

2014

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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"

Slide 23

Slide 23 text

2017

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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)

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

Value needs CONTEXT

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

2. OBJECTIONS

Slide 35

Slide 35 text

WHY SHOULD WE CARE ABOUT OBJECTIONS?

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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."

Slide 39

Slide 39 text

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."

Slide 40

Slide 40 text

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]."

Slide 41

Slide 41 text

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."

Slide 42

Slide 42 text

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."

Slide 43

Slide 43 text

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."

Slide 44

Slide 44 text

3. VALUE

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

COMPANIES DRIVING GROWTH

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

Apple: hovering between 50-80 open Scala positions

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

IBM's Big Data University

Slide 53

Slide 53 text

4. FUTURE

Slide 54

Slide 54 text

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

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

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)

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

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

Slide 59

Slide 59 text

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

Slide 60

Slide 60 text

SCALA WILL NEVER THRIVE ON VOLUME

Slide 61

Slide 61 text

SCALA WILL THRIVE ON VALUE