当前位置:网站首页>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 )
边栏推荐
- Solution for filtering by special string of microservice
- How can I get the stock account opening discount link? Is online account opening safe?
- C语言 头哥习题答案截图
- 长安链交易防重之布谷鸟过滤器
- num[i]++
- No manual prior is required! HKU & Tongji & lunarai & Kuangshi proposed self supervised visual representation learning based on semantic grouping, which significantly improved the tasks of target dete
- 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
- 进军AR领域,这一次罗永浩能成吗?
- TCP拥塞控制详解 | 1. 概述
- Scala 基礎 (二):變量和數據類型
猜你喜欢

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

pybullet机器人仿真环境搭建 5.机器人位姿可视化
Scala Foundation (2): variables et types de données

探讨:下一代稳定币

How to implement interface current limiting?

MS | Xie Liwei group found that mixed probiotics and their metabolites could alleviate colitis

C language --- basic function realization of push box 01

Science | 红树林中发现的巨型细菌挑战传统无核膜观念
![[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

C语言 头哥习题答案截图
随机推荐
基于STM32+华为云IOT设计的云平台监控系统
108. 简易聊天室11:实现客户端群聊
【小5聊】毕业8年,一直在追梦的路上
Knowing these commands allows you to master shell's own tools
牛客编程题--必刷101之动态规划(一文彻底了解动态规划)
Screenshot of the answers to C language exercises
Natural language inference with attention and fine tuning Bert pytorch
网页课程设计大作业——华山旅游网
[force deduction question] two point search: 4 Find the median of two positive arrays
知道这几个命令让你掌握Shell自带工具
[understanding of opportunity -31]: Guiguzi - Daoyu [x ī] Crisis is the coexistence of danger and opportunity
【207】Apache崩溃的几个很可能的原因,apache崩溃几个
Qt 5.9.8 安装教程
Fgetc() reads content from file
Use the array to calculate the average of N numbers, and output the numbers greater than the average
Develop operator based on kubebuilder (for getting started)
Scala 基礎 (二):變量和數據類型
进军AR领域,这一次罗永浩能成吗?
Interpretation of cloud native microservice technology trend
R329 (maix-ii-a (M2A) data summary