- Scala Machine Learning Projects
- Md. Rezaul Karim
- 196字
- 2021-06-30 19:05:40
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 model folder to make predictions on previous data, and uses the latest price to evaluate predictions. The results of such predictions are stored in the DB.
- TraderActor: After receiving a message about prediction, using rules (which at this moment are as simple as buy if the price is predicted to grow and do nothing otherwise), this writes its decision into logs. It can send an HTTP request to a URL to trigger this decision.
推薦閱讀
- Blender 3D Printing by Example
- 工業機器人維護與保養
- DevOps Bootcamp
- RedHat Linux用戶基礎
- 網絡管理工具實用詳解
- Mastering SQL Server 2014 Data Mining
- Raspberry Pi 3 Projects for Java Programmers
- 暗戰強人:黑客攻防入門全程圖解
- fastText Quick Start Guide
- AWS Administration:The Definitive Guide(Second Edition)
- Learn T-SQL Querying
- 系統與服務監控技術實踐
- 數字系統設計與Verilog HDL
- ABB工業機器人虛擬仿真教程
- 實戰GAN:TensorFlow與Keras生成對抗網絡構建