当前位置:网站首页>Detailed introduction of distributed pressure measurement system VIII: basic introduction of akka actor model
Detailed introduction of distributed pressure measurement system VIII: basic introduction of akka actor model
2022-07-06 20:17:00 【Wang Wei, Wang Pangpang】
The distributed pressure measurement system is introduced in detail :akka actor Basic introduction of the model
actor Model
Previous picture , I got it online :
It looks like sending email , Think of this model as sending email , And there's a mailbox , It seems to be multi person communication , One actor It's just one person ,actor Communicate with each other , Using email . I have used email at ordinary times , What are the characteristics of email , Is the advantage of asynchronous non blocking , The sender may not care when the receiver receives , Whether it has been handled , He just sends it to his mailbox , Of course, the recipient is also , He doesn't care who sent it to him , If he wants to deal with the mail, he takes it out of the mailbox , Process according to the specific email content .
characteristic
- Asynchronous non-blocking , Those who write letters belong to those who write letters , Write it and put it in the mailbox , The receiver belongs to the receiver , Deal with it whenever you want , In fact, it is similar to message queue , Send a message to the queue and it's done , Go on with the rest , That is, the thread can not wait .
- Data is isolated from each other , Event driven , Those who write letters cannot control the receipt , What the recipient wants to do is up to him , His own data can only be modified by himself , Relative to others is isolation , That is, there is no need to share data , Maintain their own data , Only modify the data according to the incoming letter , And the letters are orderly in the queue , The time to deal with it is 1 Sealed , Therefore, there is no concurrent data sharing problem
- No need for synchronous lock , There is no shared data , There is no need for synchronous lock
- Good concurrency , There is no need for threads to synchronize in order to share resources , Greatly improve the utilization of threads
akka System structure
Whole actor In fact, it is an attribute structure , It should be convenient for unified management, scheduling and query :
akka Core elements

akka Dependencies between core elements
You can see ,actorCell You can visit Actor, however actorCell It's internal ,Actor No direct access , therefore ,Actor You can't directly modify another Actor The state of , Thread safety can be achieved 
akka actor System initialization process

akka actor The system creates a node process

akka actor Send and process messages

The above are sorted out from the source code , There may be something wrong , Some specific details should be read by yourself .
Okay , That's it today , I hope it is helpful for learning and understanding , Don't spray when the great God sees , Only for their own learning and understanding , Limited ability , Please forgive me .
边栏推荐
- Transformer model (pytorch code explanation)
- 腾讯T2大牛亲自讲解,跳槽薪资翻倍
- 【GET-4】
- How to select several hard coded SQL rows- How to select several hardcoded SQL rows?
- 小微企业难做账?智能代账小工具快用起来
- POJ3617 Best Cow Line 馋
- Appx code signing Guide
- 微信小程序常用集合
- rt-thread i2c 使用教程
- Vscode debug run fluent message: there is no extension for debugging yaml. Should we find yaml extensions in the market?
猜你喜欢
Tencent T2 Daniel explained in person and doubled his job hopping salary

持续测试(CT)实战经验分享

B-杰哥的树(状压树形dp)

Selenium advanced operations

Error analysis ~csdn rebound shell error

5. 無線體內納米網:十大“可行嗎?”問題

PowerPivot - DAX (first time)

HMS Core 机器学习服务打造同传翻译新“声”态,AI让国际交流更顺畅

beegfs高可用模式探讨

Vscode debug run fluent message: there is no extension for debugging yaml. Should we find yaml extensions in the market?
随机推荐
句号压缩过滤器
Linear distance between two points of cesium
案例 ①|主机安全建设:3个层级,11大能力的最佳实践
Anaconda安装后Jupyter launch 没反应&网页打开运行没执行
数据的同步为每个站点创建触发器同步表
Special topic of rotor position estimation of permanent magnet synchronous motor -- fundamental wave model and rotor position angle
Transformer model (pytorch code explanation)
Zoom with unity mouse wheel: zoom the camera closer or farther
Poj3617 best cow line
How to handle the timeout of golang
Appx code signing Guide
[cloud native and 5g] micro services support 5g core network
How to select several hard coded SQL rows- How to select several hardcoded SQL rows?
Period compression filter
logstash高速入口
腾讯T4架构师,android面试基础
Tencent Android interview must ask, 10 years of Android development experience
Configuration and simple usage of the EXE backdoor generation tool quasar
PHP与EXCEL PHPExcel
Maximum likelihood estimation and cross entropy loss