Typesafe roadmap indicates the maturing of Scala

OVUM VIEW

Summary

Typesafe is the open-source organization behind Scala, the Java Virtual Machine (JVM)-compatible language that takes Java into concurrency the functional programming way. Scala’s nearest rivals are languages such as Erlang, Haskell, and F#.Net, but what makes Scala special is that it is seamlessly compatible with Java. Programming in Scala allows the blending of traditional object-oriented Java with a functional programming style. Typesafe as an organization is modeled on Red Hat in terms of its business model, with subscription-based services on top of a host of open-source projects that take Scala to new levels. Typesafe Stack 2.0 is the latest version of a set of integrated tools that offer a Rails-type web development framework called Play, with Akka, a middleware framework for scaling Scala workloads horizontally across multiple machines. Future releases of the Typesafe Stack will include Slick, a database connectivity tool.

Multicore and cloud make parallel and distributed programming the new norm

A prime driver for innovation in programming is the rise in both CPU and GPU multiple core machines that requires an approach that exploits concurrency. While Java and other object-oriented languages do handle concurrency using threads and asynchronous programming, they are difficult concepts to implement and can easily lead to deadlocks, race conditions, and difficult to reproduce side-effects. This is where a functional programming style wins out. The key concept is that in imperative programming, such as procedural and object-oriented programming, variables can be reassigned values multiple times during the running of a piece of code, whereas in functional programming, a variable is assigned a value and this remains fixed and is immutable. The advantage of immutability in parallel programming is that it leads to a reduction in errors as a result of unexpected variable changes. Furthermore, the order of execution is of much less importance in functional programming, which again is advantageous in parallel programming where workload is divided across multiple cores. Functional programming therefore allows for superior partitioning of workloads and provides much stronger encapsulation than that in OOP objects.

Scala will automatically detect multiple CPU cores, and will apportion workloads across these without the programmer needing to make any changes to a normal style of Java development. However, to fully exploit the potential of multiple cores, the programmer will exploit Scala for its functional programming advantages, as well as design algorithms for optimum parallel performance. Typesafe is still researching the potential for general programming on GPUs (GPGPUs) and it is highly likely that in future Scala will be able to exploit these additional cores that vastly out-scale the CPUs on typical machines.

Another challenge for developers is distributed computing, and Typesafe has addressed this with its Akka event-driven middleware for distributed cloud applications. The Play web framework brings a Rails type of experience to Scala, as made popular in Ruby on Rails, and makes it easy to rapidly create sophisticated web applications. The Typesafe Stack integrates these tools, and in future releases, Slick, the database connector, will enhance the capabilities of Scala in multiple dimensions including web, parallel scalability across multiple cores, and horizontal scalability across multiple machines.

Typesafe’s roadmap indicates the maturing of Scala

Scala’s ranking on the TIOBE index at number 45 belies its popularity on open-source projects as indicated on repositories such as GitHub, where it lies in 12th position. The number of jobs available for Scala developers has tripled in the last year, and the community is estimated at 100,000 developers. Typesafe and its partners run Scala training services, both in open enrollment sessions and on-site at customer locations.

Notable Scala user success stories include Twitter, which was originally built on Ruby on Rails but ran into scaling issues and transferred its core messaging service to Scala, allowing the service to grow by three orders of magnitude, and LinkedIn, which runs over 400 million transactions per day on a Scala platform.

The Typesafe Stack roadmap is for delivery in the third quarter 2012 of version 2.x, which will add the Slick database connectivity framework to updates of Scala, Akka, Play, and Typesafe Console that were included in Typesafe Stack 2.0 released in March 2012. The Typesafe Console is designed to provide performance-monitoring tasks for Java and Scala applications running on the Typesafe Stack, and will be built on over time to provide management capabilities, such as moving workloads across cores.

The Scala ecosystem covers multiple libraries donated by users such as Twitter (libraries Finagle, Kestrel), LinkedIn (Kafka, Norbert), and many others. Development plug-ins are available for Eclipse, NetBeans, IntelliJ IDEA, and more. On top of these capabilities there is the existing Java ecosystem that can be pulled in to a Scala application with a direct call. Alternatively, Scala can be invoked from a standard Java application.

In Ovum’s opinion, as multiple cores (both CPU and GPU) continue to increase, Scala is the future of Java, making the move to parallel programming even more of a necessity.

APPENDIX

Disclaimer

All Rights Reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior permission of the publisher, Ovum (an Informa business).

The facts of this report are believed to be correct at the time of publication but cannot be guaranteed. Please note that the findings, conclusions, and recommendations that Ovum delivers will be based on information gathered in good faith from both primary and secondary sources, whose accuracy we are not always in a position to guarantee. As such Ovum can accept no liability whatever for actions taken based on any information that may subsequently prove to be incorrect.