SOA

2022-03-06  本文已影响0人  Wilbur_

Monolith vs micro

monolith is single code repo

micro has different repo and each repo has its own DB

micro services sounds suspiciously like a distributed system

DDD provides a suitable method for identifying microservices

- Bounded Contexts in DDD 

Read DDD and Microservice by Eric Evans

Small Autonomous services that work together, modelled around a business domain

                                        - Sam Newman

果然想要深刻理解还是要给出清晰的定义,自己的定义

Principle of Microservices

Culture of Automation

Hide implementation Details

Avoid two services sharing same DB (tight coupling between different services)

keep message queue dumb

这个点跟 network 也很像,因为 edge network 是主要的smart implementation, 也是主要fast iteration 的节点,而core network 只是负责传输数据。 这点其实思想跟 network 是一样的

Consumer-Driven Contract

test upstream service to avoid end-end test
这样你test 如果出错你就知道你新的 code 就会 break upstream service

上一篇下一篇

猜你喜欢

热点阅读