- 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.
推薦閱讀
- 零起步輕松學(xué)單片機(jī)技術(shù)(第2版)
- 大數(shù)據(jù)技術(shù)基礎(chǔ)
- Visualforce Development Cookbook(Second Edition)
- Mastering Spark for Data Science
- Mastering VMware vSphere 6.5
- 錯(cuò)覺:AI 如何通過數(shù)據(jù)挖掘誤導(dǎo)我們
- 自動(dòng)控制原理
- MicroPython Projects
- Docker High Performance(Second Edition)
- 網(wǎng)絡(luò)安全技術(shù)及應(yīng)用
- 零起點(diǎn)學(xué)西門子S7-200 PLC
- 基于敏捷開發(fā)的數(shù)據(jù)結(jié)構(gòu)研究
- Wireshark Revealed:Essential Skills for IT Professionals
- 特征工程入門與實(shí)踐
- 機(jī)器人手工制作