当前位置:网站首页>Entity service is an anti pattern
Entity service is an anti pattern
2022-07-24 23:12:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
In the microservices architecture , The most important thing is to keep the isolation between services . Physical services (Entity Service) It is a model widely used in micro service architecture , But in fact, it is a kind of Anti pattern , Because it deviates from the principle of service isolation .Michael Nygard He mentioned this in his micro service series blog .
\\
Nygard yes “Release It!” The author of , He said that physical services are used to solve a very common problem , In a Microsoft book about E-book of microservice architecture neutralization Spring Of the two course This mode is used in .
\\
stay Nygard It seems , Antipatterns only make things worse . To illustrate that entity services are an anti pattern , He uses a large legacy monomer as an example . There are multiple instances of this application , Each instance contains all the features :
\\
\\
according to Spring A tutorial for , Refactoring this application using a microservice architecture , Decompose features into separate services . but Nygard say , Most features still require multiple entities , This will create dependencies between multiple entities . such as , Calculating the price of the shopping cart requires the involvement of all services :
\\
\\
Nygard Think , These dependencies cause coupling , This affects usability 、 Performance and capacity . He also stressed that , These dependencies lead to semantic coupling , The change of one service will affect other services . In the worst case , This will cause a service to deal with different versions of services .
\\
Nygard It summarizes the results of using entity services in microservice architecture :
\\
- Teams can still deliver services at their pace .\\\t
- Semantic coupling leads to cross team negotiation .\\\t
- A large number of requests need to call entity Services , Increased traffic load .\\\t
- The overall availability depends on more services .\
Based on the above ,Nygard Think that entity service is an anti pattern .
\\
come from Fourth.com Chief architect of Ben Morris In another blog post Nygard The article , He said , Using entity services in microservice architecture is worse than single architecture .Morris Think , One of the advantages of microservice is its autonomy , But the more fine-grained Services , The greater the coupling between them , Thus reducing autonomy . He stressed that , Process changes can become difficult , Because difficulties involve a lot of services , If the service is maintained by different development teams , Then change will become more difficult . Another risk of using a large number of small coupled services is , A service failure will produce cascading effects , Affect more services .
\\
Nygard Your blog post has triggered a long discussion . The author of Microsoft's ebook said , They have targeted the use of HTTP Calling to couple microservices provides a warning . He also stressed , Using the domain model correctly can improve the autonomy of microservices .
\\
stay Nygard In subsequent blog posts , He will introduce alternatives to physical services .
\\
Check the English text :Entity Services is an Antipattern
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/107787.html Link to the original text :https://javaforall.cn
边栏推荐
- What do GB, MB and KB mean respectively. What are the sizes
- 这个月 google的“AI具备意识”的事件的想法
- 中金证券新客理财产品收益可以达到百分之六?开户怎么开?
- Icassp 2022 | KS transformer for multimodal emotion recognition
- 生成式对抗网络的效果评估
- When texturebrush is created, it prompts that there is insufficient memory
- JDBC 驱动升级到 Version 8.0.28 连接 MySQL 的踩坑记录
- 代码覆盖率
- IP first experiment hdcl encapsulates PPP, chap, mGRE
- 聊聊 Redis 是如何进行请求处理
猜你喜欢

Use kettle to read the data in Excel file and store it in MySQL

Notes of Teacher Li Hongyi's 2020 in-depth learning series 5

《JUC并发编程 - 高级篇》05 -共享模型之无锁 (CAS | 原子整数 | 原子引用 | 原子数组 | 字段更新器 | 原子累加器 | Unsafe类 )

阿里云SSL证书

VGA display based on FPGA

Go基础笔记_4_map

把字符串转换成整数与不要二

Go basic notes_ 4_ map

基于TensorFlow和Keras的卷积神经网络实现猫狗数据集分类实验

力扣 1184. 公交站间的距离
随机推荐
The kettle job implementation runs a kettle conversion task every 6S
这个月 google的“AI具备意识”的事件的想法
Let‘s Encrypt
Error connecting MySQL database with kettle
On the problem that the on-board relay cannot be switched on due to insufficient power supply
Notes of Teacher Li Hongyi's 2020 in-depth learning series 8
Alibaba cloud SSL certificate
Financial products can reach 6%. I want to open an account to buy financial products
用VS Code搞Qt6:编译源代码与基本配置
【零基础】php代码审计之sql注入
Shell调试Debug的三种方式
给生活加点惊喜,做创意生活的原型设计师丨编程挑战赛 x 选手分享
Zheng Huijuan: Research on application scenarios and evaluation methods of data assets based on the unified market
【云原生之kubernetes】kubernetes集群高级资源对象statefulesets
阿里云SSL证书
解决JSP无法使用session.getAttribute()
salesforce零基础学习(一百一十六)workflow -> flow浅谈
Backgroundworker enables time-consuming operations without affecting interface response
谢振东:公共交通行业数字化转型升级的探索与实践
JUC concurrent programming - Advanced 05 - lock free of shared model (CAS | atomic integer | atomic reference | atomic array | field updater | atomic accumulator | unsafe class)