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 语义软件设计
应用程序
161
采用“不行,但是……”的形式响应用户的查询,例如“我现在不能执行这个
动作,因为有些功能出了问题,但我可以给你一个类似问题的响应。”
通知。有些公司实现了一项很好的服务:如果拨打客服电话需要等待很长时间
才能与工作人员通话,他们就会将你的号码记录到系统,然后给你回电。由于
HTTP/2
WebSockets
以及推送通知和其他技术的进步,如今网站和移动应用
也可以实现这些功能。你可以实现一个没有缓存,也没有断路器的功能,但是
会在服务恢复后自动回调客户端。当然这并不理想,但至少可以安抚客户,总
好过他们干着急不知道该怎么办。
这里的解构原则是:异常并不是例外,而是无时无刻不在发生的实际情况,失败的
后果从有人恼火到灾难各有不同。如果你优先考虑“乐观情况”,所有的实现工作
都以之为中心,并将异常和失败都视为边缘化的二等公民,则终有一日会动摇系统
的根本。
弹性设计以及
Resilience4J
等库的使用可以让你和客户的生活变得更轻松。
7.14
交互式文档
如果使用
RESTful
服务,则请公布
Open API
格式的文档(
Swagger
https://
swagger.io/
)。
OpenAPI
规范于
2015
年捐赠给了
Linux
基金会。该规范创建了一个
RESTful
接口,只需将所有的资源映射到相应的操作,即可轻松地开发和使用
API
这种做法具有很多好处:
可在编写代码之前编写完整的规范。
可将
API
中的操作可视化,方便内部开发人员和外部消费者快速而自信地使用
API
提供
SDK
以及脚手架生成。 ...
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