Skip to Content
微服务即学即用
book

微服务即学即用

by Ronnie Mitra, Irakli Nadareishvili
March 2022
Beginner to intermediate
343 pages
6h 4m
Chinese
China Electric Power Press Ltd.
Content preview from 微服务即学即用
78
4
上下文1 上下文2
开放主
机服务
4
-
7
:开放主机服务
除了域之间的关系类型之外,上下文映射还可以根据有界上下文之间使用的
集成类型进行区分。
4.2.2
同步集成与异步集成
有界上下文之间的集成接口可以是同步的,也可以是异步的,如图
4-8
所示。
从根本上讲,没有一种集成模式采用单一风格。
上下文之间的同步集成的常见模式是:通过
HTTP
部署的
RESTful API
,使用
二进制格式(例如
protobuf
)的
gRPC
服务以及最近使用
GraphQL
接口的服务。
在异步方面,发布
-
订阅类型的交互起主导作用。在这种交互模式中,上游
可以生成事件,而下游服务的工作人员能够处理这些他们有兴趣的事件,如
4-8
所示。
同步 异步
客户端
请求
响应
供应商
订阅者
(客户)
订阅事件
发布者
(供应商)
发布事件消费事件
消息队列
(如Kafka或者Amazon SQS)
4
-
8
:同步和异步集成
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
Python预测分析实战

Python预测分析实战

Posts & Telecom Press, Alvaro Fuentes
用Python写网络爬虫(第2版)

用Python写网络爬虫(第2版)

Posts & Telecom Press, Katharine Jarmul
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham

Publisher Resources

ISBN: 9787519864088