Skip to Content
Dapr学习手册
book

Dapr学习手册

by Haishi Bai, Yaron Schneider
November 2021
Beginner to intermediate
239 pages
4h 15m
Chinese
China Electric Power Press Ltd.
Content preview from Dapr学习手册
Dapr
的未来
207
如你所见,清单中以不同形式提供了相同能力的多种选择:远程
API
或者本
地容器。在这种情况下,
API
代理可以做的是当远程
API
不可用时回退到本
地容器实例。这从架构上来说意义重大,应用可以基于特定的能力来对其逻
辑建模,而不需要担心能力从哪里以及如何交付,因为所有的细节被隐藏在
Dapr
路由的后面。
Dapr
被扩展成了任意能力的通用交付载体之后,它可以支持许多有趣的场
景,下面我们将对其做简要的总结。
7.1.2
应用场景
利用
Dapr
为应用带来能力并不仅仅是一种服务
API
的花哨做法。这种架构打
开了一些强大的应用场景。在本节中我们将探索其中的一些。
7.1.2.1
分布式
API
管理
许多企业使用不同的云服务来支撑自己的应用。通常很难追踪所有服务的订
阅,或对服务的消费进行策略控制增强,尤其是当涉及多个云厂商提供的服
务时。因此,许多企业使用一个中心化的
API
管理服务来代理所有的云服务
调用。然后通过把策略应用到
API
管理服务上来达到控制服务消费的目的。
Dapr
提供了另一种不同的
API
管理方案。通过
Dapr
边车,
API
代理可以和
应用代码一起分布和共存。对比集中式代理,这是一个更具扩展性的架构。
而且,因为同一个集群中的
Dapr
边车共享相同的配置对象,你仍然可以通过
Dapr
配置中放入策略来进行中心化的
API
策略管理。此外,你还可以通过
接入
Dapr
的分布式追踪能力来获得所有
API
消耗的统一视图。
当你把分布式
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

流畅的Python(第2版)

流畅的Python(第2版)

Luciano Ramalho
数据科学原理

数据科学原理

Posts & Telecom Press, Sinan Ozdemir
Python预测分析实战

Python预测分析实战

Posts & Telecom Press, Alvaro Fuentes
机器学习开发者指南

机器学习开发者指南

Posts & Telecom Press, Rodolfo Bonnin

Publisher Resources

ISBN: 9787519859367