- Monoliths:单点项目
- what are MicroServices?: 什么是微服务
- Advantages of MicroServices: 微服务的好处
- Challenges with MicroServices:微服务的挑战
- Why SpringBoot & SpringCloud ?:为什么选用SpringBoot和SpringCloud
- Introducing the application:介绍application
- 大量代码
- 多项目组在同一个代码基础上
- 筋扩展某一个部分的应用变得不现实
- 技术的迭代更新变得复杂和高成本
一个微服务,是基于特定业务能力 他是可以扩展的。因此创建一个大型企业应用, 我们可以将它分为子域,使用领域驱动进行划分。最终,左右微服务在一起工作, 为用户提供一个单一的应用。
- Comprehending smaller codebase is easy: 理解更少部分的代码更容易
- Can independently scale up highly used services:可以提供扩展高使用率的服务
- Each team can focus on one (or few) MicroService(s):每个team只关注其自身的微服务
- Technology updates/rewrites become simpler:技术更新和迭代变得更简单
- Getting correct sub-domain boundaries, in the beginning, is hard
- Need more skilled developers to handle distributed application complexities
- Managing MicroServices based applications without proper DevOps culture is next to impossible
- Local developer environment setup might become complex to test cross-service communications. Though using Docker/Kubernetes this can be mitigated to some extent.
To externalize configuration of applications in a central config
server with the ability to update the configuration
values without requiring to restart the applications.
We can use Spring Cloud Config Server with git or Consul or ZooKeeper as config repository.
- catalog-service: It provides REST API to provide catalog information like products.
- inventory-service: It provides REST API to manage product inventory.
- cart-service: It provides REST API to hold the customer cart details.
- order-service: It provides REST API to manage orders.
- customer-service: It provides REST API to manage customer information.
- shoppingcart-ui: It is customer facing front-end web application.