PredictionIO – A Machine Learning Server in Scala – SF Scala
Scala in the Enterprise
-
Upload
eric-pederson -
Category
Technology
-
view
1.224 -
download
0
Transcript of Scala in the Enterprise
![Page 1: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/1.jpg)
Scala in the Enterprise
![Page 2: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/2.jpg)
Intro
• Eric Pederson– [email protected] / @ericacm– Background in Java, Groovy, Javascript, PHP, etc.
• Consulting at NYSE– One Scala app in production, one in QA– Contract finished 1Q11
![Page 3: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/3.jpg)
Platform
• JDK 1.6• Scala 2.8– Started development in March– 2.8 was bundled with Intellij IDEA
• Using lots of Java libs– Spring, Hibernate, CXF, Mule, ApacheMQ– Bouncycastle, OpenSAML, Velocity, etc, etc.
• Only Scala lib currently in use is ScalaTest
![Page 4: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/4.jpg)
What’s been working well
• Improved productivity• Concise code• Java interop• Type inferencing• REPL (mvn scala:console)• Collections API– Especially higher ordered fns (map/filter/etc)
• Lambdas / Closures– Prevents proliferation of classes
![Page 5: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/5.jpg)
What’s been working well
• Mixins / trait stacking– trait UserIdentifierCmd extends ApiKeyCmd {..}– trait RoleIdCmd extends ApiKeyCmd {..}– object cmd extends UserIdentifierCmd with RoleIdCmd {..}
• For comprehenions / expressions• Case classes / pattern matching• Actors• Type aliases• Structural (duck) typing• Import aliases
![Page 6: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/6.jpg)
Complaints
• Eclipse support is weak• Lack of type inferencing in IDEA• Collections are not serializable• Cannot write classfile annotations in Scala• Would like Groovy style .? null short circuiting
![Page 7: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/7.jpg)
Complaints
• Someone needs to write a “FP in Scala” book– Plenty of literature using Haskell– Blog posts here and there on advanced Scala FP– scalaz is looking promising in this area– Something like “Learn you a Haskell for Great
Good” plus an in-depth discussion on scalaz.
![Page 8: Scala in the Enterprise](https://reader036.fdocuments.net/reader036/viewer/2022082923/5564922ed8b42ab8278b4722/html5/thumbnails/8.jpg)
Currently looking at
• Lift “Box” or similar– Options don’t include failure info– scalaz Validation
• http://applicative-errors-scala.googlecode.com/svn/artifacts/0.6/html/index.html
– http://www.milessabin.com/misc/Chain.scala• Camel
– To replace Mule– Scala DSL, Akka integration
• Scalate / SSP• scala-time• scalaz