Dapr入门学习 Day 12

构建块(二)

Building blocks

通过标准HTTP或gRPC api访问模块化最佳实践

Modular best practices accessible over standard HTTP or gRPC APIs

2. 状态管理 State management

Endpoint

/v1.0/state

说明

应用程序状态是应用程序希望在单个会话之外保留的任何内容。Dapr提供了一个基于键/值的状态API,其中包含用于持久性的可插拔状态存储。

Application state is anything an application wants to preserve beyond a single session. Dapr provides a key/value-based state API with pluggable state stores for persistence.

3. 发布和订阅 Publish and subscribe

Endpoint

/v1.0/publish
/v1.0/subscribe

说明

Pub/Sub是一种松散耦合的消息传递模式,发送者(或发布者)将消息发布到订阅者订阅的主题。Dapr支持应用程序之间的发布/订阅模式

Pub/Sub is a loosely coupled messaging pattern where senders (or publishers) publishes messages to a topic, to which subscribers subscribe. Dapr supports the pub/sub pattern between applications.

image.png
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容