当前位置:网站首页>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 .
边栏推荐
- 腾讯安卓开发面试,android开发的基础知识
- Color is converted to tristimulus value (r/g/b) (dry stock)
- How to select several hard coded SQL rows- How to select several hardcoded SQL rows?
- Learn to punch in Web
- AsyncHandler
- 【云原生与5G】微服务加持5G核心网
- Anaconda安裝後Jupyter launch 沒反應&網頁打開運行沒執行
- 【云小课】EI第47课 MRS离线数据分析-通过Flink作业处理OBS数据
- Pay attention to the partners on the recruitment website of fishing! The monitoring system may have set you as "high risk of leaving"
- Selenium advanced operations
猜你喜欢
Maximum likelihood estimation and cross entropy loss
报错分析~csdn反弹shell报错
BeagleBoneBlack 上手记
Anaconda安裝後Jupyter launch 沒反應&網頁打開運行沒執行
A5000 vgpu display mode switching
Tencent byte Alibaba Xiaomi jd.com offer got a soft hand, and the teacher said it was great
Error analysis ~csdn rebound shell error
01 基础入门-概念名词
beegfs高可用模式探讨
22-07-05 upload of qiniu cloud storage pictures and user avatars
随机推荐
redisson bug分析
BUUCTF---Reverse---easyre
Color is converted to tristimulus value (r/g/b) (dry stock)
RT thread I2C tutorial
Oceanbase Community Edition OBD mode deployment mode stand-alone installation
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
Method keywords deprecated, externalprocname, final, forcegenerate
Maximum likelihood estimation and cross entropy loss
Jupyter launch didn't respond after Anaconda was installed & the web page was opened and ran without execution
Redisson bug analysis
Cesium 两点之间的直线距离
mod_wsgi + pymssql通路SQL Server座
JVM_常见【面试题】
AddressSanitizer 技术初体验
HDU 1026 search pruning problem within the labyrinth of Ignatius and the prince I
青龙面板白屏一键修复
Introduction of Xia Zhigang
Social recruitment interview experience, 2022 latest Android high-frequency selected interview questions sharing
报错分析~csdn反弹shell报错
【GET-4】