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学习手册
12
0
能运行,并且在服务调用上仅增加了亚毫秒级的开销。
轻量级运行时减少了
资源消耗并缩短了边车注入时间。
这使
Dapr
非常适合动态扩展的高密度场
景,例如
IoT
和大数据应用程序。
0.1.4
统一的编程模型
对于不同类型的服务,存在着不同的编程模型:无状态服务、有状态服务、函数、
actors
MapReduce
任务等。
Dapr
并未对这些服务类型强加分隔。
相反,它
将所有的服务都视为处理单元,这些处理单元接受一些输入并生成一些输出。
Dapr
允许你以一致的方式编写所有服务。
你可以重新配置服务,从而让它
在之后有不同的表现。
请想象一下,编写一个无状态的
Web
服务,然后将其重新配置为具有输入
/
输出绑定的函数,并将其托管在你选择的无服务环境中。或者,你可以通过
引入状态存储使其成为有状态服务。而且,你可以进一步让它具有身份感知,
使其成为一个
actor
。这种灵活性在之前是无法想象的,直到
Dapr
的出现。
许多企业应用程序包含具有不同类型的服务,例如,无状态的
Web
前端,有
状态的后端,以及大量被建模成并激活为
actors
的作业。开发人员常常被迫
学习所有的这些编程模型,或者将所有服务类型强制转换为他们最熟悉的那
种单一编程模型。尽管我们已经看到一些具有“纯函数”或“纯
actor
”的成
功项目,但大多数企业应用程序都跨越了多个编程模型,框架甚至托管环境。
Dapr
提供了一个统一的编程模型,该模型通过标准化的
HTTP/gRPC
协议提
供能力。开发人员不再需要针对特定的服务类型来设计他们的服务 ...
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