SlideShare uma empresa Scribd logo
1 de 37
Scala Adoption by Enterprises

           Mike Slinn
About Mike Slinn
• Principal at Micronautics Research
    Corporation
•   Hands-on architect, mentor, trainer
•   Interim technical leader for companies in
    transition
•   Recognized in US Federal court as a
    software expert
•   Author of “Composable Futures with Akka 2.0
•   Twitter: mslinn
About You, the Attendees

• ___% Managers
o ___% Full-time programmers
• ___% Interns
• Programmers
    o   ___% New to Scala
    o   ___% Intermediate Scala programmers
    o   ___% Expert Scala programmers
    o   ___% Currently work on Scala projects
    o   ___% Windows, Linux, Mac, other
Scala adoption by enterprises
James Gosling
 “Father of Java”
                      “If I were to pick a
                    language to use today
                       other than Java, it
                         would be Scala”
James Strachan
Groovy Language &
Apache Camel book
                    “If someone had shown
                     me the Programming in
                       Scala book in 2003, I
                      would not have created
                             Groovy.”
Alex Payne
Early Twitter engineer,
     co-author of         “Joy is underrated
“Programming Scala”
                             as a metric for a
                                language's
                            potential success
                            in a development
                               organization”
What is Scala?
• Natural progression on the JVM
• Same deployment mechanism as Java
• Scale up and out, with concurrency and/or
 parallelism
  o   Java.util.concurrent
  o   Scala Parallel collections
  o   Actors
  o   Futures (allows map/reduce)
  o   Dataflow
  o   Map/reduce frameworks
Scala vs. Other OO & FP Languages



           Java     Scala    Clojure   Ruby
Typing     Static   Static   Dynamic Dynamic
Paradigm   OO       OO & FP FP         OO
Two Types of Programming
• Imperative Programming
  o Describes computation in terms of statements that
    change program state
• Functional Programming
  o Describes computation in terms of mathematical
    functions, avoiding state and mutable data
Scala is Object-Oriented
• Primitives are full objects
• Static methods are attached to singletons
• Imperative style
• You can use Scala simply as a better Java
Scala is Also Functional
• Transform data objects instead of mutation
• Strong list processing (e.g. map and reduce)
• Thread-safe
• Parallelizable
• Supports composition
Stack Overflow / GitHub Popularity
Commercial Adoption




    • Scala jobs tripled last year
    • 100,000 current developers?
Geoffrey Moore’s technology
adoption lifecyle
Gartner’s Hype Cycle
Scala 2012 Roadmap

   May 2011      Oct 2011       Q1 2012          Q3 2012


 Typesafe       Typesafe       Typesafe        Typesafe
 Stack 1.0      Stack 1.1      Stack 2.0       Stack 2.1

  Scala 2.9.0    Scala 2.9.1     Scala 2.9.2     Scala 2.10
  Akka 1.1       Akka 1.2        Akka 2.0        Akka 2.1
                 IDE 1.0         Play 2.0        Play 2.1
                                 SBT 0.11.2      Slick (DB)
                                 IDE 2.0 M1      IDE 2.0 RC
Scala Toolchain
• At a tipping point
• Toolchain options
  o SBT w/ Text editor
       Flexible, multiplatform, complex, compatible with
        Maven, documentation lacking
       Compatible with IDEs
  o Maven – consider this only if you already use Maven
  o Eclipse – Usable
  o IntelliJ IDEA – Usable
  o Netbeans – Not popular, not well supported
  o Ant – Not popular but works fine
Companies Using Scala




                        19
Use Case: guardian.co.uk
• 100,000 lines of code.
• Spring, Velocity, Hibernate, Oracle DB,
    Maven.
•   Full release every 2 weeks.
•   Wrote integration tests using ScalaTest.
•   After a month of writing tests in Scala, they
    converted the whole site to Scala.
•   Java and Scala code co-existed and
    depended on each other
Use Case: Wordnik
• 5:1 reduction in code
• Corresponding increase in quality
• Maintenance costs decreased similarly
• Scala attracts good developers
• Typesafe was very responsive
• REPL makes IDEs less important
• Pattern matching was unexpected benefit
• SBT love/hate
• Never going back to Java
Non-Unique Enterprise Concerns
• Performance
• Scalability
• Robustness
• Politics
Enterprise Characteristics
• Many locations
• IT department often separate from
    development teams
•   Legacy apps and data
•   Lots of SOAP
•   Big investment in JEE containers
•   Risk averse
•   Compliance issues
•   Budget for incremental change is small
    portion of overall IT budget
Why Scala In the Enterprise?
• Big scale, solid programs
• Get more done
  o   More expressive
  o   Fewer lines of code
  o   More productive
  o   Strong community
  o   Fewer bugs (constant number of bugs/line of code)
• Talent attractor
Horizontal Scale – More Cores
Concurrency Is Too Hard
• Multithreaded programs tend to be buggy
    o Non-determinism caused by concurrent threads
      accessing shared mutable state.
• Actors and transactions manage state and
    are therefore not a solution.
•   To get deterministic processing, avoid
    mutable state.
•   This means functional programming.
Scala Offers Better Concurrency
• Akka Composable futures*
• Akka/Scala Dataflow*
• Akka Actors
• Scala Parallel collections


* Covered in my book:
  “Composable Futures with Akka 2.0”
Scala / Java Class Definitions
Class Usage
Why Not Scala?
• Steep learning curve
  o   New syntax
  o   Many new concepts
  o   Tools experiencing heavy growth
  o   Documentation still weak, not many books
  o   How to find a Scala programmer?
        Grow instead of hire
• JDK 8 will have closures
  o Release Sept 2013
  o Mass adoption 2017?
Scala Vocabulary
• Lazy evaluation       • Composition
• Monads                • Pattern matching
• Continuations         • Type extensions
• Recursion             • Traits
• Closures              • Control structure
• Immutable datatypes       abstraction
• Currying              •   Refined types
• Higher order              o Covariance
                            o Variance
 functions
                            o Type bounds
Who Should Introduce Scala into
an Enterprise?
• Top down approach
  o Gradual, planned implementation
• Bottom up approach
  o Skunk works
• Sneak in on the side
  o Custom project
• Get toolchain working before including others
Types of Scala Applications
• Web platforms
• Trading platforms
• Financial modeling
• Simulation
• Fast to first product, scalable afterwards
When to Use Scala?
• “Skunk works” approach
  o Gradual introduction minimizes risk
  o No need to master all of Scala before using some of it
• “Save the company” approach
  o High risk, high gain
Where to Introduce Scala?
• Address scalability issues
• DSLs for problem statement
• Testing: integration, black box, white box
    o Lots of boilerplate; Scala removes it
    o Tests focus on problem domain; DSLs help
    o Users (non-programmers) can examine DSLs for
      accuracy and maybe write code
•   Replace components
How to Use Scala?
• Java 6+ or .NET is required
• Choice of Java toolchain
  o SBT, Maven, IntelliJ IDEA, Eclipse
  o Jenkins/Hudson, other CI
• .NET toolchain not yet ready for prime time
• BUT:
  o Can convert Java/Scala to .NET with IKVM
  o I’ve done it – works well, easy to use
Thank you!


           Mike Slinn
 mslinn@micronauticsresearch.com

Mais conteúdo relacionado

Mais procurados

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumNgoc Dao
 
Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Trisha Gee
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettextNgoc Dao
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java DevelopersSolix JJ
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueAndrus Adamchik
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterKonstantin Tsykulenko
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKAJohan Edstrom
 
Search and analyze your data with elasticsearch
Search and analyze your data with elasticsearchSearch and analyze your data with elasticsearch
Search and analyze your data with elasticsearchAnton Udovychenko
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Ryan Cuprak
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarGal Marder
 
OSGi Community Event 2010 - OSGi and Android
OSGi Community Event 2010 - OSGi and AndroidOSGi Community Event 2010 - OSGi and Android
OSGi Community Event 2010 - OSGi and Androidmfrancis
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules uploadRyan Cuprak
 
Java 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala StoryJava 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala StoryTomer Gabel
 
Real world Scala hAkking NLJUG JFall 2011
Real world Scala hAkking NLJUG JFall 2011Real world Scala hAkking NLJUG JFall 2011
Real world Scala hAkking NLJUG JFall 2011Raymond Roestenburg
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVMAlex Birch
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinayViplav Jain
 
20171108 PDN HOL React Basics
20171108 PDN HOL React Basics20171108 PDN HOL React Basics
20171108 PDN HOL React BasicsRich Ross
 

Mais procurados (20)

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
 
Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettext
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java Developers
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with Bootique
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
 
Search and analyze your data with elasticsearch
Search and analyze your data with elasticsearchSearch and analyze your data with elasticsearch
Search and analyze your data with elasticsearch
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
 
OSGi Community Event 2010 - OSGi and Android
OSGi Community Event 2010 - OSGi and AndroidOSGi Community Event 2010 - OSGi and Android
OSGi Community Event 2010 - OSGi and Android
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
 
Java 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala StoryJava 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala Story
 
Real world Scala hAkking NLJUG JFall 2011
Real world Scala hAkking NLJUG JFall 2011Real world Scala hAkking NLJUG JFall 2011
Real world Scala hAkking NLJUG JFall 2011
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVM
 
Scala for C# Developers
Scala for C# DevelopersScala for C# Developers
Scala for C# Developers
 
scalaphx-akka-http
scalaphx-akka-httpscalaphx-akka-http
scalaphx-akka-http
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinay
 
20171108 PDN HOL React Basics
20171108 PDN HOL React Basics20171108 PDN HOL React Basics
20171108 PDN HOL React Basics
 

Destaque

RTBI_Impact report_Final_PDF file
RTBI_Impact report_Final_PDF fileRTBI_Impact report_Final_PDF file
RTBI_Impact report_Final_PDF fileParasuram K
 
Information in a Current Condition
Information in a Current Condition Information in a Current Condition
Information in a Current Condition Emma Dickens
 
Help u india online education portal. find colleges, institutes in india
Help u india  online education portal. find colleges, institutes in indiaHelp u india  online education portal. find colleges, institutes in india
Help u india online education portal. find colleges, institutes in indiaHelp u india
 
Dynamic composition of virtual network functions in a cloud environment
Dynamic composition of virtual network functions in a cloud environmentDynamic composition of virtual network functions in a cloud environment
Dynamic composition of virtual network functions in a cloud environmentFrancesco Foresta
 
XML Amsterdam 2012 Keynote
XML Amsterdam 2012 KeynoteXML Amsterdam 2012 Keynote
XML Amsterdam 2012 Keynotejimfuller2009
 
Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Kevin H.A. Tan
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaRahul Jain
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to ScalaTim Underwood
 
Comps & modelling
Comps & modellingComps & modelling
Comps & modellingdrkisane
 
Ssmc dg-6-dgc-in endtimes
Ssmc dg-6-dgc-in endtimesSsmc dg-6-dgc-in endtimes
Ssmc dg-6-dgc-in endtimesSSMC
 
Ovi maps
Ovi mapsOvi maps
Ovi mapsfsdf
 
Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...
Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...
Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...M. Christopher Roebuck
 
Design strategy crash course
Design strategy crash courseDesign strategy crash course
Design strategy crash courseReView Design
 
Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照
Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照
Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照Huang Yu Ming
 
02 03 Parma
02 03 Parma02 03 Parma
02 03 ParmaClubIN
 

Destaque (20)

Scala at Netflix
Scala at NetflixScala at Netflix
Scala at Netflix
 
Hanuman
HanumanHanuman
Hanuman
 
RTBI_Impact report_Final_PDF file
RTBI_Impact report_Final_PDF fileRTBI_Impact report_Final_PDF file
RTBI_Impact report_Final_PDF file
 
Information in a Current Condition
Information in a Current Condition Information in a Current Condition
Information in a Current Condition
 
Certificate_1
Certificate_1Certificate_1
Certificate_1
 
Help u india online education portal. find colleges, institutes in india
Help u india  online education portal. find colleges, institutes in indiaHelp u india  online education portal. find colleges, institutes in india
Help u india online education portal. find colleges, institutes in india
 
Dynamic composition of virtual network functions in a cloud environment
Dynamic composition of virtual network functions in a cloud environmentDynamic composition of virtual network functions in a cloud environment
Dynamic composition of virtual network functions in a cloud environment
 
Engineering Degree
Engineering DegreeEngineering Degree
Engineering Degree
 
XML Amsterdam 2012 Keynote
XML Amsterdam 2012 KeynoteXML Amsterdam 2012 Keynote
XML Amsterdam 2012 Keynote
 
Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Groovy on Android (as of 2016)
Groovy on Android (as of 2016)
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Why Scala?
Why Scala?Why Scala?
Why Scala?
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Comps & modelling
Comps & modellingComps & modelling
Comps & modelling
 
Ssmc dg-6-dgc-in endtimes
Ssmc dg-6-dgc-in endtimesSsmc dg-6-dgc-in endtimes
Ssmc dg-6-dgc-in endtimes
 
Ovi maps
Ovi mapsOvi maps
Ovi maps
 
Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...
Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...
Dollars to Doughnuts: Predicting Prescription Drug Costs of Beneficiaries and...
 
Design strategy crash course
Design strategy crash courseDesign strategy crash course
Design strategy crash course
 
Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照
Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照
Let your living photos better. 生活拍樂趣 (一) 拍好你的生活照
 
02 03 Parma
02 03 Parma02 03 Parma
02 03 Parma
 

Semelhante a Scala adoption by enterprises

Experience Converting from Ruby to Scala
Experience Converting from Ruby to ScalaExperience Converting from Ruby to Scala
Experience Converting from Ruby to ScalaJohn Nestor
 
From java to scala at crowd mix
From java to scala at crowd mixFrom java to scala at crowd mix
From java to scala at crowd mixStefano Galarraga
 
Whitepages Practical Experience Converting from Ruby to Reactive
Whitepages Practical Experience Converting from Ruby to ReactiveWhitepages Practical Experience Converting from Ruby to Reactive
Whitepages Practical Experience Converting from Ruby to ReactiveDragos Manolescu
 
An Introduction to Scala
An Introduction to ScalaAn Introduction to Scala
An Introduction to ScalaBrent Lemons
 
Scala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusScala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusBoldRadius Solutions
 
Scala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJScala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJRodrigo Lima
 
20160524 ibm fast data meetup
20160524 ibm fast data meetup20160524 ibm fast data meetup
20160524 ibm fast data meetupshinolajla
 
Challenges of moving a java team to scala
Challenges of moving a java team to scalaChallenges of moving a java team to scala
Challenges of moving a java team to scalaJoão Cavalheiro
 
ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019Rory Graves
 
Scala & Spark Online Training
Scala & Spark Online TrainingScala & Spark Online Training
Scala & Spark Online TrainingLearntek1
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeAndrus Adamchik
 
Assist software awesome scala
Assist software   awesome scalaAssist software   awesome scala
Assist software awesome scalaAssistSoftware
 
Functional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdfFunctional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdfssusercd195b
 
Scala and Spark are Ideal for Big Data
Scala and Spark are Ideal for Big DataScala and Spark are Ideal for Big Data
Scala and Spark are Ideal for Big DataJohn Nestor
 
Transitioning from Java to Scala for Spark - March 13, 2019
Transitioning from Java to Scala for Spark - March 13, 2019Transitioning from Java to Scala for Spark - March 13, 2019
Transitioning from Java to Scala for Spark - March 13, 2019Gravy Analytics
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with ScalaManish Pandit
 

Semelhante a Scala adoption by enterprises (20)

Experience Converting from Ruby to Scala
Experience Converting from Ruby to ScalaExperience Converting from Ruby to Scala
Experience Converting from Ruby to Scala
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
From java to scala at crowd mix
From java to scala at crowd mixFrom java to scala at crowd mix
From java to scala at crowd mix
 
Whitepages Practical Experience Converting from Ruby to Reactive
Whitepages Practical Experience Converting from Ruby to ReactiveWhitepages Practical Experience Converting from Ruby to Reactive
Whitepages Practical Experience Converting from Ruby to Reactive
 
Scala-Ls1
Scala-Ls1Scala-Ls1
Scala-Ls1
 
An Introduction to Scala
An Introduction to ScalaAn Introduction to Scala
An Introduction to Scala
 
Scala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusScala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadius
 
Scala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJScala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJ
 
20160524 ibm fast data meetup
20160524 ibm fast data meetup20160524 ibm fast data meetup
20160524 ibm fast data meetup
 
Challenges of moving a java team to scala
Challenges of moving a java team to scalaChallenges of moving a java team to scala
Challenges of moving a java team to scala
 
Scala goods bads
Scala goods badsScala goods bads
Scala goods bads
 
ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019
 
Scala & Spark Online Training
Scala & Spark Online TrainingScala & Spark Online Training
Scala & Spark Online Training
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM Alternative
 
Assist software awesome scala
Assist software   awesome scalaAssist software   awesome scala
Assist software awesome scala
 
Functional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdfFunctional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdf
 
Scala and Spark are Ideal for Big Data
Scala and Spark are Ideal for Big DataScala and Spark are Ideal for Big Data
Scala and Spark are Ideal for Big Data
 
Transitioning from Java to Scala for Spark - March 13, 2019
Transitioning from Java to Scala for Spark - March 13, 2019Transitioning from Java to Scala for Spark - March 13, 2019
Transitioning from Java to Scala for Spark - March 13, 2019
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
 

Mais de Mike Slinn

Evaluating Blockchain Companies
Evaluating Blockchain CompaniesEvaluating Blockchain Companies
Evaluating Blockchain CompaniesMike Slinn
 
Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Mike Slinn
 
Dotty (Scala 3) Preview
Dotty (Scala 3) PreviewDotty (Scala 3) Preview
Dotty (Scala 3) PreviewMike Slinn
 
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformEmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformMike Slinn
 
Smart Contracts That Learn
Smart Contracts That LearnSmart Contracts That Learn
Smart Contracts That LearnMike Slinn
 
Polyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterprisePolyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterpriseMike Slinn
 
Play Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a ProposalPlay Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a ProposalMike Slinn
 
Adobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseMike Slinn
 

Mais de Mike Slinn (8)

Evaluating Blockchain Companies
Evaluating Blockchain CompaniesEvaluating Blockchain Companies
Evaluating Blockchain Companies
 
Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn
 
Dotty (Scala 3) Preview
Dotty (Scala 3) PreviewDotty (Scala 3) Preview
Dotty (Scala 3) Preview
 
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformEmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
 
Smart Contracts That Learn
Smart Contracts That LearnSmart Contracts That Learn
Smart Contracts That Learn
 
Polyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterprisePolyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the Enterprise
 
Play Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a ProposalPlay Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a Proposal
 
Adobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the Enterprise
 

Último

Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 

Último (20)

Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 

Scala adoption by enterprises

  • 1. Scala Adoption by Enterprises Mike Slinn
  • 2. About Mike Slinn • Principal at Micronautics Research Corporation • Hands-on architect, mentor, trainer • Interim technical leader for companies in transition • Recognized in US Federal court as a software expert • Author of “Composable Futures with Akka 2.0 • Twitter: mslinn
  • 3. About You, the Attendees • ___% Managers o ___% Full-time programmers • ___% Interns • Programmers o ___% New to Scala o ___% Intermediate Scala programmers o ___% Expert Scala programmers o ___% Currently work on Scala projects o ___% Windows, Linux, Mac, other
  • 5. James Gosling “Father of Java” “If I were to pick a language to use today other than Java, it would be Scala”
  • 6. James Strachan Groovy Language & Apache Camel book “If someone had shown me the Programming in Scala book in 2003, I would not have created Groovy.”
  • 7. Alex Payne Early Twitter engineer, co-author of “Joy is underrated “Programming Scala” as a metric for a language's potential success in a development organization”
  • 8. What is Scala? • Natural progression on the JVM • Same deployment mechanism as Java • Scale up and out, with concurrency and/or parallelism o Java.util.concurrent o Scala Parallel collections o Actors o Futures (allows map/reduce) o Dataflow o Map/reduce frameworks
  • 9. Scala vs. Other OO & FP Languages Java Scala Clojure Ruby Typing Static Static Dynamic Dynamic Paradigm OO OO & FP FP OO
  • 10. Two Types of Programming • Imperative Programming o Describes computation in terms of statements that change program state • Functional Programming o Describes computation in terms of mathematical functions, avoiding state and mutable data
  • 11. Scala is Object-Oriented • Primitives are full objects • Static methods are attached to singletons • Imperative style • You can use Scala simply as a better Java
  • 12. Scala is Also Functional • Transform data objects instead of mutation • Strong list processing (e.g. map and reduce) • Thread-safe • Parallelizable • Supports composition
  • 13. Stack Overflow / GitHub Popularity
  • 14. Commercial Adoption • Scala jobs tripled last year • 100,000 current developers?
  • 17. Scala 2012 Roadmap May 2011 Oct 2011 Q1 2012 Q3 2012 Typesafe Typesafe Typesafe Typesafe Stack 1.0 Stack 1.1 Stack 2.0 Stack 2.1 Scala 2.9.0 Scala 2.9.1 Scala 2.9.2 Scala 2.10 Akka 1.1 Akka 1.2 Akka 2.0 Akka 2.1 IDE 1.0 Play 2.0 Play 2.1 SBT 0.11.2 Slick (DB) IDE 2.0 M1 IDE 2.0 RC
  • 18. Scala Toolchain • At a tipping point • Toolchain options o SBT w/ Text editor  Flexible, multiplatform, complex, compatible with Maven, documentation lacking  Compatible with IDEs o Maven – consider this only if you already use Maven o Eclipse – Usable o IntelliJ IDEA – Usable o Netbeans – Not popular, not well supported o Ant – Not popular but works fine
  • 20. Use Case: guardian.co.uk • 100,000 lines of code. • Spring, Velocity, Hibernate, Oracle DB, Maven. • Full release every 2 weeks. • Wrote integration tests using ScalaTest. • After a month of writing tests in Scala, they converted the whole site to Scala. • Java and Scala code co-existed and depended on each other
  • 21. Use Case: Wordnik • 5:1 reduction in code • Corresponding increase in quality • Maintenance costs decreased similarly • Scala attracts good developers • Typesafe was very responsive • REPL makes IDEs less important • Pattern matching was unexpected benefit • SBT love/hate • Never going back to Java
  • 22. Non-Unique Enterprise Concerns • Performance • Scalability • Robustness • Politics
  • 23. Enterprise Characteristics • Many locations • IT department often separate from development teams • Legacy apps and data • Lots of SOAP • Big investment in JEE containers • Risk averse • Compliance issues • Budget for incremental change is small portion of overall IT budget
  • 24. Why Scala In the Enterprise? • Big scale, solid programs • Get more done o More expressive o Fewer lines of code o More productive o Strong community o Fewer bugs (constant number of bugs/line of code) • Talent attractor
  • 25. Horizontal Scale – More Cores
  • 26. Concurrency Is Too Hard • Multithreaded programs tend to be buggy o Non-determinism caused by concurrent threads accessing shared mutable state. • Actors and transactions manage state and are therefore not a solution. • To get deterministic processing, avoid mutable state. • This means functional programming.
  • 27. Scala Offers Better Concurrency • Akka Composable futures* • Akka/Scala Dataflow* • Akka Actors • Scala Parallel collections * Covered in my book: “Composable Futures with Akka 2.0”
  • 28. Scala / Java Class Definitions
  • 30. Why Not Scala? • Steep learning curve o New syntax o Many new concepts o Tools experiencing heavy growth o Documentation still weak, not many books o How to find a Scala programmer?  Grow instead of hire • JDK 8 will have closures o Release Sept 2013 o Mass adoption 2017?
  • 31. Scala Vocabulary • Lazy evaluation • Composition • Monads • Pattern matching • Continuations • Type extensions • Recursion • Traits • Closures • Control structure • Immutable datatypes abstraction • Currying • Refined types • Higher order o Covariance o Variance functions o Type bounds
  • 32. Who Should Introduce Scala into an Enterprise? • Top down approach o Gradual, planned implementation • Bottom up approach o Skunk works • Sneak in on the side o Custom project • Get toolchain working before including others
  • 33. Types of Scala Applications • Web platforms • Trading platforms • Financial modeling • Simulation • Fast to first product, scalable afterwards
  • 34. When to Use Scala? • “Skunk works” approach o Gradual introduction minimizes risk o No need to master all of Scala before using some of it • “Save the company” approach o High risk, high gain
  • 35. Where to Introduce Scala? • Address scalability issues • DSLs for problem statement • Testing: integration, black box, white box o Lots of boilerplate; Scala removes it o Tests focus on problem domain; DSLs help o Users (non-programmers) can examine DSLs for accuracy and maybe write code • Replace components
  • 36. How to Use Scala? • Java 6+ or .NET is required • Choice of Java toolchain o SBT, Maven, IntelliJ IDEA, Eclipse o Jenkins/Hudson, other CI • .NET toolchain not yet ready for prime time • BUT: o Can convert Java/Scala to .NET with IKVM o I’ve done it – works well, easy to use
  • 37. Thank you! Mike Slinn mslinn@micronauticsresearch.com

Notas do Editor

  1. Modified from scalaBin (norwegianscala usergroup) logo
  2. Image from Martin Odersky
  3. Image from Martin Odersky Dec 2011.
  4. I updated Martin Odersky’s slides from @ SF Scala Dec 2011
  5. From Martin Odersky @ SF Scala Dec 2011