面向.NET开发人员的Dapr——总结和前景
目錄:
面向.NET開發(fā)人員的Dapr——前言
面向.NET開發(fā)人員的Dapr——分布式世界
面向.NET開發(fā)人員的Dapr——俯瞰Dapr
面向.NET開發(fā)人員的Dapr——入門
面向.NET開發(fā)人員的Dapr——參考應(yīng)用程序
面向.NET開發(fā)人員的Dapr——狀態(tài)管理
面向.NET開發(fā)人員的Dapr——發(fā)布和訂閱
面向.NET開發(fā)人員的Dapr——綁定
面向.NET開發(fā)人員的Dapr——可觀察性
面向.NET開發(fā)人員的Dapr——機(jī)密
Summary and the road ahead
總結(jié)和前景
We're at the end of our Dapr flight. The jet plane flying at 20,000 feet from?chapter 2?is on final approach and about to land.
Dapr航班到達(dá)終點(diǎn)。飛機(jī)從第二章在20000英尺高空飛行,最后接近地面并即將著陸
As the plane taxis to the gate, let's take a minute to review some important conclusions from this guide:
Dapr?- Dapr is a?Distributed Application Runtime?that streamlines how you build distributed applications. It exposes an architecture of building blocks and pluggable components. Dapr provides a?dynamic glue?that binds your application with infrastructure capabilities that exist in the Dapr runtime. Instead of building infrastructure plumbing, you and your team focus on delivering business features to customers.
Open source and cross-platform?- The native Dapr API can be consumed by?any platform?that supports HTTP or gRPC. Dapr also provides language-specific SDKs for popular development platforms. Dapr v1.0 supports Go, Python, .NET, Java, PHP, and JavaScript.
Building blocks?- Dapr building blocks encapsulate distributed application functionality. At the time of this writing, Dapr supports the seven building blocks shown in figure 11-1.
當(dāng)飛機(jī)滑行到登機(jī)口時(shí),花一點(diǎn)時(shí)間回顧本指南中的重要結(jié)論:
Dapr?-Dapr 是一種?分布式應(yīng)用程序運(yùn)行時(shí)?,它可以簡(jiǎn)化構(gòu)建分布式應(yīng)用程序的方式。它公開構(gòu)建基塊和可插入組件的體系結(jié)構(gòu)。Dapr 提供了一個(gè)?動(dòng)態(tài)膠水?,它將應(yīng)用程序與 Dapr 運(yùn)行時(shí)中存在的基礎(chǔ)結(jié)構(gòu)功能進(jìn)行綁定。你和你的團(tuán)隊(duì)將精力集中于向客戶提供業(yè)務(wù)功能,而不是構(gòu)建基礎(chǔ)結(jié)構(gòu)管道。
開源和跨平臺(tái)?-本機(jī) Dapr API 可由支持 HTTP 或 gRPC 的?任何平臺(tái)?使用。Dapr 還為常見開發(fā)平臺(tái)提供特定于語(yǔ)言的 Sdk。Dapr v1.0 支持Go、Python、.NET、Java、PHP 和 JavaScript。
構(gòu)建塊?-Dapr 構(gòu)建塊封裝分布式應(yīng)用程序功能。撰寫本文時(shí),Dapr 支持圖11-1 中所示的七個(gè)構(gòu)建塊。
Figure 11-1. Dapr building blocks.
圖 11-1。Dapr 構(gòu)建塊。
Components?- Dapr components provide the concrete implementation for each Dapr building block capability. They expose a common interface that enables developers to swap out component implementations without changing application code. Figure 11-2 shows the relationship among components, building blocks, and your service.
組件?-Dapr 組件提供每個(gè) Dapr 構(gòu)建塊功能的具體實(shí)現(xiàn)。它們公開一個(gè)公共接口,使開發(fā)人員能夠在不更改應(yīng)用程序代碼的情況下替換組件實(shí)現(xiàn)。圖11-2 顯示組件、構(gòu)建塊和服務(wù)之間的關(guān)系。
Figure 11-2. Dapr building block integration.
圖 11-2。Dapr 構(gòu)建塊集成。
Sidecars?- Dapr runs alongside your application in a sidecar architecture, either as a separate process of a container. Your application communicates with the Dapr APIs over HTTP and gRPC. Sidecars provide isolation and encapsulation as they aren't part of the service, but connected to it. Figure 11-3 shows a sidecar architecture.
邊車 -Dapr 在邊車架構(gòu)中與應(yīng)用程序一起運(yùn)行,可以作為容器的單獨(dú)進(jìn)程。應(yīng)用程序通過 HTTP 和 gRPC 與 Dapr Api 通信。邊車提供隔離和封裝,它們不是服務(wù)的一部分,而是連接到它。圖11-3 顯示了邊車的體系結(jié)構(gòu)。
Figure 11-3. Sidecar architecture.
圖 11-3。邊車體系結(jié)構(gòu)。
Hosting environments?Dapr has cross-platform support and can run in multiple environments. At the time of this writing, the environments include a local self-hosted mode and Kubernetes.
eShopOnDapr?- This book includes an accompanying reference application entitled?eShopOnDapr. Using a popular e-commerce application domain, the reference application demonstrates the usage of each building block. It's an evolution of the widely popular?eShopOnContainers, released several years ago.
?Dapr 宿主環(huán)境提供跨平臺(tái)支持,可以在多個(gè)環(huán)境中運(yùn)行。撰寫本文時(shí),環(huán)境包含本地自承載模式和 Kubernetes。
eShopOnDapr -此書籍包含一個(gè)名為 eShopOnDapr的附屬參考應(yīng)用程序。使用常見的電子商務(wù)應(yīng)用域,參考應(yīng)用程序演示了每個(gè)構(gòu)建基塊的用法。這是 eShopOnContainers(幾年前發(fā)布且廣泛使用)的一種演變。
The road ahead
前景
Looking forward, Dapr has the potential to have a profound impact on distributed application development. What can you expect from the Dapr team and its open-source contributors?
展望未來(lái),Dapr 有可能對(duì)分布式應(yīng)用程序開發(fā)產(chǎn)生深遠(yuǎn)的影響。你對(duì)Dapr 團(tuán)隊(duì)及其開源參與者有哪些期望?
At the time of writing, the list of proposed enhancements for Dapr include:
撰寫本文時(shí),Dapr 的建議增強(qiáng)列表包括:
Feature enhancements to existing building blocks:? ? ? 現(xiàn)有構(gòu)建塊的功能增強(qiáng):
Query capabilities in state management enabling you to retrieve multiple values. ?? ??狀態(tài)管理中的查詢能力使你能夠檢索多個(gè)值。
Topic filtering in pub/sub enabling you to filter topics based on their content. ?? ? ??通過 "發(fā)布/訂閱" 中的主題篩選,您可以基于內(nèi)容篩選主題。
An application tracing API in observability that provides tracing in the application directly without having to bind to specific libraries. ?? ? ?應(yīng)用程序跟蹤 API,無(wú)需綁定到特定庫(kù)即可直接在應(yīng)用程序中提供跟蹤。
Binding and pub/sub support for actors providing event driven capabilities to the actor programming model. Bound components will trigger events and messages invoke methods in the actor. ?? ? 通過為參與者增加綁定和發(fā)布/訂閱支持,為參與者編程模型提供事件驅(qū)動(dòng)能力。綁定組件將觸發(fā)事件和消息調(diào)用執(zhí)行組件中的方法。
New building blocks:? ? ??新構(gòu)建塊:
Configuration API building block for reading and writing configuration data. The block will bind to providers that include Azure Configuration Manager or GCP Configuration Management. ?? ??用于讀取和寫入配置數(shù)據(jù)的配置 API 構(gòu)建塊。該構(gòu)建塊將綁定到 Azure Configuration Manager 或 GCP GCP Configuration Management的提供程序。
Http scale-to-zero autoscale. ?? ? ?Http 自動(dòng)縮容至0。
Leader election building block to provide singleton instances and locking semantic capabilities. ?? ? ? leader選舉構(gòu)建塊提供單例和鎖定語(yǔ)義能力(不會(huì)翻譯)。
Transparent proxying building block for service invocation, enabling you to route messages based on URLs or DNS addresses at the network level. ?? ??用于服務(wù)調(diào)用的透明代理構(gòu)建塊,使你能夠基于網(wǎng)絡(luò)級(jí)別的 Url 或 DNS 地址來(lái)路由消息。
Resiliency building block (circuit breakers, bulkheads & timeouts). ?? ?彈性構(gòu)建塊 (斷路熔斷器,隔艙 & 超時(shí)) 。
Integration with frameworks and cloud native technologies. Some examples include:? ? ? 與框架和云原生技術(shù)的集成。示例包括:
Django
Nodejs
Express
Kyma
Midway
New language SDKs:? ? ??新語(yǔ)言 Sdk:
JavaScript
RUST
C++
New hosting platforms:? ? ??新的宿主平臺(tái):
VMs
Azure IoT Edge
Azure Stack Edge
Azure Service Fabric
Developer and operator productivity tooling:? ? ??開發(fā)人員和操作員生產(chǎn)工具:
VS Code extension. ?? ? ? VS Code 擴(kuò)展。
Remote Dev Containers for local debugging a DevOps pipeline development. ?? ? ?用于本地調(diào)試 DevOps 流水線開發(fā)的遠(yuǎn)程開發(fā)容器。
Dapr operational dashboard enhancements that will provide deeper visibility into the operational concerns of managing Dapr applications. ?? ? Dapr 操作儀表板增強(qiáng)功能,可更深入地了解管理 Dapr 應(yīng)用程序的操作問題。
Dapr version 1.0 provides developers with a compelling toolbox for building distributed applications. As the proposed enhancement list shows, Dapr is under active development with many new capabilities to come. Stay tuned to the?Dapr site?and?Dapr announcement blog?for future updates.
Dapr 版本1.0 為開發(fā)人員提供了引人注目的工具箱來(lái)構(gòu)建分布式應(yīng)用程序。如建議的增強(qiáng)列表所示,Dapr 處于積極開發(fā)下,將有許多新功能。請(qǐng)繼續(xù)關(guān)注 Dapr 站點(diǎn)?和 Dapr 公告博客?,跟蹤將來(lái)更新。
目錄:
面向.NET開發(fā)人員的Dapr——前言
面向.NET開發(fā)人員的Dapr——分布式世界
面向.NET開發(fā)人員的Dapr——俯瞰Dapr
面向.NET開發(fā)人員的Dapr——入門
面向.NET開發(fā)人員的Dapr——參考應(yīng)用程序
面向.NET開發(fā)人員的Dapr——狀態(tài)管理
面向.NET開發(fā)人員的Dapr——發(fā)布和訂閱
面向.NET開發(fā)人員的Dapr——綁定
面向.NET開發(fā)人員的Dapr——可觀察性
面向.NET開發(fā)人員的Dapr——機(jī)密
總結(jié)
以上是生活随笔為你收集整理的面向.NET开发人员的Dapr——总结和前景的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 面向.NET开发人员的Dapr——参考应
- 下一篇: 面向.NET开发人员的Dapr——机密