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.
Upcoming SlideShare
Sbt, idea and eclipse



Scala adoption by enterprises

This presentation is for enterprises that are considering adopting Scala. The author is managing editor of, which offers self-paced online courses that teach Introductory and Intermediate Scala and Play Framework.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Scala adoption by enterprises

  1. 1. Scala Adoption by Enterprises Mike Slinn
  2. 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. 3. About You, the Attendees• ___% Managerso ___% 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
  4. 4. James Gosling “Father of Java” “If I were to pick a language to use today other than Java, it would be Scala”
  5. 5. James StrachanGroovy Language &Apache Camel book “If someone had shown me the Programming in Scala book in 2003, I would not have created Groovy.”
  6. 6. Alex PayneEarly Twitter engineer, co-author of “Joy is underrated“Programming Scala” as a metric for a languages potential success in a development organization”
  7. 7. 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
  8. 8. Scala vs. Other OO & FP Languages Java Scala Clojure RubyTyping Static Static Dynamic DynamicParadigm OO OO & FP FP OO
  9. 9. 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
  10. 10. 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
  11. 11. Scala is Also Functional• Transform data objects instead of mutation• Strong list processing (e.g. map and reduce)• Thread-safe• Parallelizable• Supports composition
  12. 12. Stack Overflow / GitHub Popularity
  13. 13. Commercial Adoption • Scala jobs tripled last year • 100,000 current developers?
  14. 14. Geoffrey Moore’s technologyadoption lifecyle
  15. 15. Gartner’s Hype Cycle
  16. 16. 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
  17. 17. 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
  18. 18. Companies Using Scala 19
  19. 19. Use Case:• 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
  20. 20. 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
  21. 21. Non-Unique Enterprise Concerns• Performance• Scalability• Robustness• Politics
  22. 22. 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
  23. 23. 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
  24. 24. Horizontal Scale – More Cores
  25. 25. 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.
  26. 26. 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”
  27. 27. Scala / Java Class Definitions
  28. 28. Class Usage
  29. 29. 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?
  30. 30. 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
  31. 31. Who Should Introduce Scala intoan 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
  32. 32. Types of Scala Applications• Web platforms• Trading platforms• Financial modeling• Simulation• Fast to first product, scalable afterwards
  33. 33. 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
  34. 34. 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
  35. 35. 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
  36. 36. Thank you! Mike Slinn
  • GustavoArajoDunho

    Feb. 24, 2016
  • jafer59

    Apr. 8, 2015
  • IgorSpasi

    Apr. 5, 2015
  • joobn

    Apr. 4, 2015
  • halyph

    Mar. 16, 2015
  • tongqg

    Sep. 20, 2014
  • debop

    Jun. 2, 2014
  • akh200

    Mar. 5, 2014
  • gervaisb

    Feb. 5, 2014
  • amitrajpurkar

    Feb. 4, 2014
  • lutzh

    Jan. 15, 2014
  • prateekjainaa

    Sep. 12, 2013
  • a001u

    Jul. 27, 2013
  • phpxer

    Jan. 12, 2013
  • leftcopychenhx

    Jan. 2, 2013
  • jryanday

    Dec. 24, 2012
  • VahidAb

    Dec. 22, 2012
  • SushiBarFly

    Oct. 21, 2012
  • prayagupd

    Jun. 13, 2012
  • hypermin

    May. 15, 2012

This presentation is for enterprises that are considering adopting Scala. The author is managing editor of, which offers self-paced online courses that teach Introductory and Intermediate Scala and Play Framework.


Total views


On Slideshare


From embeds


Number of embeds