当前位置:网站首页>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 )
边栏推荐
- When a programmer is disturbed 10 times a day, the consequences are amazing!
- 【毕业季】致毕业生的一句话:天高任鸟飞,海阔凭鱼跃
- 我把它当副业月入3万多,新手月入过万的干货分享!
- [force deduction question] two point search: 4 Find the median of two positive arrays
- Leetcode 1170. 比较字符串最小字母出现频次(可以,已解决)
- 1-12vmware adds SSH function
- num[i]++
- Count the number of words in a line of string and take it as the return value of the function
- Redis 概述整理
- How can I get the stock account opening discount link? Is online account opening safe?
猜你喜欢

Constructors and Destructors

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

国内首款开源 MySQL HTAP 数据库即将发布,三大看点提前告知
![[force deduction question] two point search: 4 Find the median of two positive arrays](/img/4f/43aa7e14344e7e1a2fb7c1d209d13b.png)
[force deduction question] two point search: 4 Find the median of two positive arrays

【MATLAB项目实战】基于卷积神经网络与双向长短时(CNN-LSTM)融合的锂离子电池剩余使用寿命预测
![[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](/img/b6/21e51fa7f79d4a4b950f061703f0fb.png)
[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

When a programmer is disturbed 10 times a day, the consequences are amazing!

对话长安马自达高层,全新产品将在Q4发布,空间与智能领跑日系
Scala Foundation (2): variables et types de données

Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)
随机推荐
架构实战营毕业设计
Toupper function
C language --- basic function realization of push box 01
《软件工程》期末重点复习笔记
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!
进军AR领域,这一次罗永浩能成吗?
[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection
pybullet机器人仿真环境搭建 5.机器人位姿可视化
TCP拥塞控制详解 | 1. 概述
Learn about common functional interfaces
1-12vmware adds SSH function
国内首款开源 MySQL HTAP 数据库即将发布,三大看点提前告知
Scala 基礎 (二):變量和數據類型
What does the inner structure of the neural network "alchemy furnace" look like? An interpretation of the thesis by the doctor of Oxford University
[chat in 5] eight years after graduation, I have been pursuing my dream
Codeforces Round #802 (Div. 2)
心情不好,我就这样写代码
基于STM32+华为云IOT设计的云平台监控系统
Multiply the values of the upper triangular elements of the array by M
了解下常见的函数式接口