当前位置:网站首页>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 )
边栏推荐
- Redis migration (recommended operation process)
- 数据分析----numpy快速入门
- [learn FPGA programming from scratch -46]: Vision - development and technological progress of integrated circuits
- C language -- legal identifier and integer
- 电路中缓存的几种形式
- Use the array to calculate the average of N numbers, and output the numbers greater than the average
- [从零开始学习FPGA编程-46]:视野篇 - 集成电路的发展与技术进步
- day10每日3题(1):逐步求和得到正数的最小值
- Interpretation of cloud native microservice technology trend
- Notes on key review of software engineering at the end of the term
猜你喜欢

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

# 补齐短板-开源IM项目OpenIM关于初始化/登录/好友接口文档介绍

IAR engineering adapts gd32 chip

stm32h7b0替代h750程序导致单片机挂掉无法烧录程序问题

我把它当副业月入3万多,新手月入过万的干货分享!

Knowing these commands allows you to master shell's own tools
![[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

数字藏品与NFT到底有何区别

当一个程序员一天被打扰 10 次,后果很惊人!

无需人工先验!港大&同济&LunarAI&旷视提出基于语义分组的自监督视觉表征学习,显著提升目标检测、实例分割和语义分割任务!...
随机推荐
Experience in hierarchical debugging of boards and cards
Count the number of words in a line of string and take it as the return value of the function
电路中缓存的几种形式
R329 (maix-ii-a (M2A) data summary
Solution for filtering by special string of microservice
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!
并发编程整体脉络
C语言 头哥习题答案截图
Supplement the short board - Open Source im project openim about initialization / login / friend interface document introduction
Set up your own website (16)
r329(MAIX-II-A(M2A)资料汇总
# 补齐短板-开源IM项目OpenIM关于初始化/登录/好友接口文档介绍
[learn FPGA programming from scratch -46]: Vision - development and technological progress of integrated circuits
Calculate the sum of the main diagonals of the array
构造函数和析构函数
Leetcode 1170. 比较字符串最小字母出现频次(可以,已解决)
How to separate jar packages and resource files according to packaging?
对话长安马自达高层,全新产品将在Q4发布,空间与智能领跑日系
Scala Foundation (2): variables et types de données
【从删库到跑路】JDBC 完结篇(一天学完系列!!学完赶紧跑!)