Concurrency through Akka actors

Concurrency is achieved through utilization of the actor model using the Akka Scala library. Actors act as independent entities and can pass async messages to other actors. In this project, there are three actors: SchedulerActor, PredictionActor, and TraderActor:

  • SchedulerActor: Requests price data, stores them into DB, sends a message with prices to PredictionActor, receives an answer, and passes it to TraderActor.
  • PredictionActor: After receiving a message with prices, it predicts the next price using the best model available (this has to be chosen in application.conf; we will see the details later on). It passes a message with the prediction back to SchedulerActor, uses the rest of the modes from the 

Get Scala Machine Learning Projects 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.