当前位置:网站首页>Teach you to learn dapr - 1 The era of net developers
Teach you to learn dapr - 1 The era of net developers
2022-06-26 16:45:00 【Masa technical team】
Dapr Full name
Distributed Application Runtime, Distributed application runtime
Dapr The slogan of the
Simplify cloud native application development , Focus on the core logic of the application , Make the code simple 、 portable
Dapr The goal of
- Building blocks for best practices
- Any language or framework
- Uniformity , portable , Open API
- Adoption criteria
- Scalable and pluggable components
- It's not about the platform ( Local , Cloud computing , Edge calculation, etc )
- Community driven , supplier ( manufacturer ) neutral

Dapr Design idea
Here we must first understand a few questions , And then look at it Dapr How to solve these problems
The following information has the original picture in English , Chinese translation for personal understanding , Good English friends can look at the original picture directly .
Why is microservices so difficult
- Developers need to build their own runtime to deal with distributed application problems
- The development languages supported by the runtime are limited , And has the characteristics of strict control ( function ) aggregate
- The portability of the runtime is limited , Generally, only specific infrastructure platforms are supported

The requirements of distributed applications
The content is quoted from Multi-Runtime Microservices Architecture https://www.infoq.com/articles/multi-runtime-microservice-architecture/
Be careful : The secondary content does not correspond to the picture , Combine functions into scenarios
- Life cycle
- Faster release cycle
- Automated Deployment
- Recover from a mistake
- Automated scaling
- The Internet
- Service discovery
- Tracking and telemetry ( Observability )
- Information switching : Point to point 、 Release / subscribe , Intelligent routing
- state
- Service Orchestration 、 workflow
- Distributed singleton (Actor)
- Temporary dispatch (Cron)
- Idempotency
- Stateful error recovery
- cache
- binding
- Conversion protocol
- Support different message exchange patterns : polling 、 Event driven 、 request / Answer, etc
- Transform message format
- Perform a custom error recovery process
- Security mechanism

Comparison between traditional middleware and cloud native
Traditional middleware uses a variety of SDK The way to provide capabilities , The cloud native platform passes through various peripheral platforms Runtime, At present, the more interesting thing is , Everyone made the same choice Sidecar.

Multiple runtime microservice boundaries
K8s And containers have made a huge leap in the life cycle management of multilingual applications , And lay the foundation for future innovation
Service Mesh stay K8s It has been improved , With advanced network functions , And start digging into the application
Knative Focus on serverless workloads through rapid scaling , It solves the requirements of service orchestration and event driven binding
Dapr With K8s、Knative and Service Mesh Based on the idea of , Delve into the application runtime , Handling stateful workloads 、 Binding and integration requirements , Acting as modern distributed middleware
It is mainly divided into 3 Parts of ,K8s、 When the mecha is running ( gateway 、Dapr + Knative)、 Business logic .
Dapr The emergence of allows developers to focus more on business logic , Business logic runs as a service .
Benefits of multiple runtime
Loose coupling between business logic and increasing concerns of distributed systems .
Business logic often changes , Depends on business priorities .
Distributed primitives are provided by software vendors , As a library 、 Containers 、 Services to use . These codes are based on supplier priority 、 Release cycle 、 Security Patch 、 Open source governance rules, etc .
They can't see each other , Can't control each other .

Dapr The advantages of :Any language, anywhere
It has nothing to do with language , It's not about the platform

Distributed application runtime
Official explanation
Help developers build event driven 、 Resilient distributed applications . Whether it's local 、 In the cloud or on edge devices , Can help you solve the challenges of building microservices , And keep the code platform independent .
You can see Dapr More concrete
- With the application HTTP and gRPC signal communication
- There are some building blocks inside
- Running on the cloud

Dapr With service grid
- Developers are more focused on the code level , adopt SDK( There is no mark in the figure ) And dapr Building block communication , oriented localhost Programming
- O & M pays more attention to security 、 Observability 、 On issues such as robustness . And the flow control part ,dapr( It could be temporary ) No, .

Sidecar The world of
- be applied to Sidecar Communication is through Dapr API( Has been encapsulated into different development languages SDK), In the process, through OpenTelemetry Supports observability ( That is, tracking 、 journal 、 indicators )
- Between applications through Sidecar signal communication , Support mTLS, This refers to service invocation ( namely Service Invocation)
- Sidecar Through between gRPC( The picture does not show ),Bindings,Pub/Sub Can communicate
- Observability is everywhere , adopt Prometheus、Zipkin、Fluentd etc. , visualization OpenTelemetry Some of the data in
But as far as I know, no one can take over the whole OpenTelemetry Of , If so, you are welcome to correct .
- State management is also managed by Sidecar Acting
about .Net The meaning of
- .Net SDK It's Microsoft's own son , Give Way .Net and Java Together at a new starting point, standing on the same running line
- Distributed application runtime .Net The new architecture of brings new ideas and opportunities
- Speed up .Net Update iteration of technology stack
- Sharing open source ecology
We are acting , New framework 、 New ecology
Our goal is The freedom of the 、 Easy-to-use 、 Highly malleable 、 functional 、 Robust .
So we learn from Building blocks Design concept of , Working on a new framework MASA Framework, What are its characteristics ?
- Native support Dapr, And allow Dapr Replace with traditional means of communication
- Unlimited architecture , Single application 、SOA、 Micro services support
- Support .Net Native framework , Reduce the burden of learning , In addition to the concepts that must be introduced in a specific field , Insist on not making new wheels
- Rich ecological support , In addition to the framework, there are component libraries 、 Authority Center 、 Configuration center 、 Troubleshooting center 、 A series of products such as Alarm Center
- Unit test coverage of the core code base 90%+
- Open source 、 free 、 Community driven
- What is the ? We are waiting for you , Come together and discuss
After several months of production project practice , Completed POC, At present, the previous accumulation is being refactored into new open source projects
At present, the source code has been synchronized to Github( The document site is under planning , Will gradually improve ):
QQ Group :7424099
Wechat group : Plus technology operation wechat (MasaStackTechOps), Remarks , Invite in

Reprinted from :( guiguzi )
边栏推荐
- Cuckoo filter for Chang'an chain transaction
- What does the inner structure of the neural network "alchemy furnace" look like? An interpretation of the thesis by the doctor of Oxford University
- MS | Xie Liwei group found that mixed probiotics and their metabolites could alleviate colitis
- Use the array to calculate the average of N numbers, and output the numbers greater than the average
- Arduino uno + DS1302 simple time acquisition and serial port printing
- The first open source MySQL HTAP database in China will be released soon, and the three highlights will be notified in advance
- Day10 daily 3 questions (2): count the number of the largest groups
- How can I get the stock account opening discount link? Is online account opening safe?
- Interpretation of cloud native microservice technology trend
- Call the random function to generate 20 different integers and put them in the index group of institute a
猜你喜欢
![[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection](/img/45/1e712300ea655856762394fba09066.png)
[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection

I regard it as a dry product with a monthly income of more than 30000 yuan for sidelines and more than 10000 yuan for novices!

The first open source MySQL HTAP database in China will be released soon, and the three highlights will be notified in advance

Memory partition model
Scala Foundation (2): variables et types de données

Stm32h7b0 replaces the h750 program, causing the MCU to hang up and unable to burn the program

对话长安马自达高层,全新产品将在Q4发布,空间与智能领跑日系

Learn about common functional interfaces

了解下常见的函数式接口

经典同步问题
随机推荐
QT 5.9.8 installation tutorial
Qt 5.9.8 安装教程
Teach you to learn dapr - 5 Status management
Count the number of each vowel letter in the string
无需人工先验!港大&同济&LunarAI&旷视提出基于语义分组的自监督视觉表征学习,显著提升目标检测、实例分割和语义分割任务!...
【MATLAB项目实战】基于卷积神经网络与双向长短时(CNN-LSTM)融合的锂离子电池剩余使用寿命预测
[force deduction question] two point search: 4 Find the median of two positive arrays
Scala 基础 (二):变量和数据类型
Scala 基礎 (二):變量和數據類型
[graduation season] a word for graduates: the sky is high enough for birds to fly, and the sea is wide enough for fish to leap
Stm32h7b0 replaces the h750 program, causing the MCU to hang up and unable to burn the program
C language -- legal identifier and integer
100+ data science interview questions and answers Summary - basic knowledge and data analysis
Least squares system identification class II: recursive least squares
Pybullet robot simulation environment construction 5 Robot pose visualization
JS教程之 使用 Electron.JS 构建原生桌面应用程序乒乓游戏
Calculate the average of N numbers in the group indexed by the formal parameter x, move the data less than the average in the group indexed to the front of the array, and move the data greater than or
day10每日3题(3):数组中的字符串匹配
并发编程整体脉络
Niuke Xiaobai monthly race 50