知识卡片

普通读书笔记卡 · 3331.h

契约还包含不可见行为

理解等级:中级

方法签名之外,日期格式、排序、加密、SLO、错误、幂等性和协议也会形成消费者预期。文档和契约测试应把这些行为显式化,避免为了表达语义而把实现库拖进公开契约。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第6章《Principles of Proper Services》(源文件:`_epub-src/OPS/ch06.xhtml`,归一化正文 [71671:75922)) - 结论依据:原文列出数据格式、排序、错误、幂等、暴露协议等非显而易见的契约要素,并建议用文档和测试表达。 - 原始内容:Ordering: getUserByIds returns a list of users; what is the order of that list? Is it ordered alphabetically by email, or UUID, or in the order requested in the batch request? Ascending or descending? Service Level Objectives (SLOs) 75 : Do consumers require specific SLOs or non-functional expectations like performance to be met such as: How fast should the service return? Within 10ms-100ms or even faster? What is the impact of downtime? What uptime metrics do your consumers want?