- 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.
推薦閱讀
- Hands-On Intelligent Agents with OpenAI Gym
- Canvas LMS Course Design
- 機器學習與大數據技術
- Matplotlib 3.0 Cookbook
- 21天學通ASP.NET
- iClone 4.31 3D Animation Beginner's Guide
- Nginx高性能Web服務器詳解
- Windows Server 2008 R2活動目錄內幕
- 多媒體制作與應用
- 電子設備及系統人機工程設計(第2版)
- Learning ServiceNow
- Ansible 2 Cloud Automation Cookbook
- Data Analysis with R(Second Edition)
- Eclipse全程指南
- Java求職寶典