Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Latest commit

 

History

History
66 lines (51 loc) · 2.55 KB

02-recap-scala2-akka-typed-scala3.md

File metadata and controls

66 lines (51 loc) · 2.55 KB

­

­

­

­

Recap

Scala 2, Dotty, Scala 3, and Akka Typed


Scala 2 - The current state

­

  • Currently supported versions
    • 2.12
    • 2.13
      • Important progress on compiler performance and collections rewrite
      • New, binary compatible Vector implementation
      • Most recent release 2.13.11
      • Allow, under some restrictions to use Scala 3 libraries in Scala 2 code (using Tasty) and vice-versa. See the Compatibility Reference pages in the Scala 3 Migration Guide

Dotty/Scala 3

­


The Actor Model and Akka

­

  • As mentioned before, the Scala 2 application we'll be working with, uses the Akka toolkit and is composed of a number of so-called Actors
  • Akka Actors are based on the Actor Model invented by Carl Hewitt in 1973
  • The Actor Model provides:
    • A higher level of abstraction for writing concurrent and distributed applications
    • Alleviates the developer from having to deal with explicit locking and thread management
  • An Actor is the base unit of computing in the Actor Model
  • An Actor
    • Has an address (of type ActorRef)
    • Can send messages to other Actors
    • Can create other Actors
    • Has a behaviour that can potentially change after processing a message

Akka Actors - Protocol Definition

­

  • An Actor has a Protocol that defines
    • The message [types] it can process: so-called Commands
    • The messages it can send in response: so-called Responses

Actor protocol