当前位置:网站首页>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 .
边栏推荐
- 【云原生与5G】微服务加持5G核心网
- js实现力扣71题简化路径
- Zoom with unity mouse wheel: zoom the camera closer or farther
- Recyclerview not call any Adapter method :onCreateViewHolder,onBindViewHolder,
- Standardized QCI characteristics
- Technology sharing | packet capturing analysis TCP protocol
- 报错分析~csdn反弹shell报错
- 某东短信登录复活 安装部署教程
- Unity making plug-ins
- Continuous test (CT) practical experience sharing
猜你喜欢
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
BUUCTF---Reverse---easyre
(3) Web security | penetration testing | basic knowledge of network security construction, IIS website construction, EXE backdoor generation tool quasar, basic use of
Enumeration gets values based on parameters
深度学习分类网络 -- ZFNet
5. Wireless in vivo nano network: top ten "feasible?" problem
语音识别(ASR)论文优选:全球最大的中英混合开源数据TALCS: An Open-Source Mandarin-English Code-Switching Corpus and a Speech
Tencent byte Alibaba Xiaomi jd.com offer got a soft hand, and the teacher said it was great
棋盘左上角到右下角方案数(2)
Jupyter launch didn't respond after Anaconda was installed & the web page was opened and ran without execution
随机推荐
HDU 1026 Ignatius and the Princess I 迷宫范围内的搜索剪枝问题
方法关键字Deprecated,ExternalProcName,Final,ForceGenerate
新一代垃圾回收器—ZGC
Cesium 点击绘制圆形(动态绘制圆形)
棋盘左上角到右下角方案数(2)
js实现力扣71题简化路径
深度学习分类网络 -- ZFNet
Example of shutter text component
腾讯T2大牛亲自讲解,跳槽薪资翻倍
22-07-05 七牛云存储图片、用户头像上传
22-07-05 upload of qiniu cloud storage pictures and user avatars
New generation garbage collector ZGC
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
Is it difficult for small and micro enterprises to make accounts? Smart accounting gadget quick to use
小微企业难做账?智能代账小工具快用起来
Special topic of rotor position estimation of permanent magnet synchronous motor -- Summary of position estimation of fundamental wave model
2022年6月语音合成(TTS)和语音识别(ASR)论文月报
PHP与EXCEL PHPExcel
Example of applying fonts to flutter
Tencent architects first, 2022 Android interview written examination summary