• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Scala adoption by enterprises
 

Scala adoption by enterprises

on

  • 7,137 views

This presentation is for enterprises that are considering adopting Scala. The author is managing editor of http://scalacourses.com, which offers self-paced online courses that teach Introductory and ...

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

Statistics

Views

Total Views
7,137
Views on SlideShare
6,880
Embed Views
257

Actions

Likes
14
Downloads
0
Comments
0

6 Embeds 257

http://www.scoop.it 250
http://localhost 3
http://translate.googleusercontent.com 1
https://twitter.com 1
http://www.linkedin.com 1
http://www.docshut.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Modified from scalaBin (norwegianscala usergroup) logo
  • Image from Martin Odersky
  • Image from Martin Odersky Dec 2011.
  • I updated Martin Odersky’s slides from @ SF Scala Dec 2011
  • From Martin Odersky @ SF Scala Dec 2011

Scala adoption by enterprises Scala adoption by enterprises Presentation Transcript

  • 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• ___% 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
  • James Gosling “Father of Java” “If I were to pick a language to use today other than Java, it would be Scala”
  • James StrachanGroovy Language &Apache Camel book “If someone had shown me the Programming in Scala book in 2003, I would not have created Groovy.”
  • Alex PayneEarly Twitter engineer, co-author of “Joy is underrated“Programming Scala” as a metric for a languages 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 RubyTyping Static Static Dynamic DynamicParadigm 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 technologyadoption 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 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
  • 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