Chapter 12. Asynchronous programming
This chapter covers
- Scala, servlets, and mutable state
- Using Futures for asynchronous programming
- Using Akka Actors with Scalatra
- Big data in Scalatra with Spark
Scala makes multicore, distributed, and asynchronous programming easier. Its focus on immutability, as well as associated libraries such as Akka, lower the conceptual burdens of concurrency management by making it easier to reason about your code. Why is this important?
Most other languages still rely on old-style concurrency management tools like locks and threads, which can be extremely difficult to use because they are non-deterministic. That is, you can’t necessarily reproduce your threading bugs when you want, because they can be the ...
Get Scalatra in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.