可执行信息和发送消息的服务?

15-01-20 pinghe

微服务设计

One big complaint Russ hears is about problems in management and monitoring when breaking one system into many small services. His best advice is to not build services that send out messages either that they are OK or that they are failing, instead have them send “actionable information”, a service should inform about its problems but also what should be done.

建议的发送“可执行的信息”,不要构建发送消息的服务, 不能理解是什么含义

[该贴被pinghe于2015-01-20 16:33修改过]

[该贴被pinghe于2015-01-20 16:35修改过]

banq
2015-01-20 17:11

2015-01-20 16:02 "@pinghe"的内容
actionable information ...

服务应该是发送有价值的信息,切合实际的信息,而不是泛泛的“正常或失败”,如果失败,应该失败在哪里,如果正常,应该告知正常的结果,这些也就是函数编程中对函数的输出的定义。

因为微服务粒度细,不再像以前粗粒度,可以完成一个通用大功能,完成了就OK,没有完成就返回失败,由用户浏览器决定怎么办,而微服务的调用可能也是后端或前端中间件中某个组件,这些组件一旦调用失败,就是输出日志报警,让监控者来处理,监控人员必须尽可能获得当时出错的更多信息才能判断错误在哪里。

以上只是我个人理解。