Skip to Content
语义软件设计
book

语义软件设计

by Eben Hewitt
September 2022
Beginner to intermediate
321 pages
4h 50m
Chinese
China Electric Power Press Ltd.
Content preview from 语义软件设计
172
7
7
-
1
:事件消息的结构
属性
数据类型
必须
描述
示例
事件类型
字符串
事件类型识别代码
ProleModied,
OrderCreated
事件
ID
字符串
每个事件的唯一识别符
[UUID]
关联
ID
字符串
寻找其他相关事件
ID
的识别符
[UUID]
时间戳
时间戳
事件的创建时间
03/27/2020 17:15:00Z00
事件上下文
字典
键值对
特定于事件类型的上
ProleID:1148652
下文数据
StartDate:
...
EndDate:
...
事件名称
结构化
资源名称
完全限定且可发现
[
可发现的寻址名称
]
字符串
为了方便服务之间的互操作,
UUID
字段应当采用字符串类型,而非原生语言的
UUID
类型。为了方便数据库的进出转换以及跨
.NET
Java
Python
的服务实现,
使用字符串更好。
总的来说,事件的使用比较随意,但也要经过深思熟虑。默认情况下,我们会使用
同步请求
/
响应模型,这样只要知道事件的含义,就知道会发生什么。相反,异步
事件应当明确标出来。这不仅可以提高系统的可扩展性和描述性,而且在不需要决
定事件时也很有好处,因为可以推迟事件的“引入”。这种方式很强大,因为业务
经常发生变化,系统会不断发展,不同的客户有不同的需求,不同受众的看法也不同。
应用程序中的任何反应都不应采用硬编码。我们应该使用事件处理器,这样服务就
可以构建成考虑上下文的代理,而不是静态的、预先确定的、一成不变的 ...
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

金融中的人工智能

金融中的人工智能

Posts & Telecom Press, Jeffrey Ng, Subhash Shah
移动端机器学习实战

移动端机器学习实战

Posts & Telecom Press, Karthikeyan NG
精通数据科学算法

精通数据科学算法

Posts & Telecom Press, David Natingga

Publisher Resources

ISBN: 9787519870300