Book Image

Learn Scala Programming

By : Slava Schmidt
Book Image

Learn Scala Programming

By: Slava Schmidt

Overview of this book

The second version of Scala has undergone multiple changes to support features and library implementations. Scala 2.13, with its main focus on modularizing the standard library and simplifying collections, brings with it a host of updates. Learn Scala Programming addresses both technical and architectural changes to the redesigned standard library and collections, along with covering in-depth type systems and first-level support for functions. You will discover how to leverage implicits as a primary mechanism for building type classes and look at different ways to test Scala code. You will also learn about abstract building blocks used in functional programming, giving you sufficient understanding to pick and use any existing functional programming library out there. In the concluding chapters, you will explore reactive programming by covering the Akka framework and reactive streams. By the end of this book, you will have built microservices and learned to implement them with the Scala and Lagom framework.
Table of Contents (19 chapters)

Introduction

In Chapter 11, An Introduction to the Akka and Actor Models, we discovered the actor model and how Akka implements it.

The original actor paper states three possible actions that actors can perform as computational units:

    • They can send messages to other known actors
    • They can create new actors
    • They can designate behavior for future message processing

Because of the universality of this model, the specifics of how these points are to be implemented depends on the hardware, operating system, programming language, existing libraries, and ultimately on the design choices of the implementer. Akka Typed offers a slightly different programming model compared to untyped Akka.

Furthermore, in this chapter, we'll refer to normal Akka as Akka untyped to be specific about which library is being mentioned, even though untyped Akka was always named just Akka in the previous...