SOA

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

  • Modelled Around business domain
  • Culture of Automation
  • hide implementation Details
  • Decentralise all The Things
  • Deploy Independently
  • Consumer First
  • Isolate Failure
  • Highly Observable

Culture of Automation

  • Infrastructure Automation
  • Automated Testing
  • Continuous Delivery

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容