官术网_书友最值得收藏!

Building microservices

In this section, we will discuss how to build a microservice-based application using the same online bookshop example as in the previous sections. Our application has the following four modules:

  • Customer Account Management
  • Order Management
  • Book Inventory Management
  • Shipping Management

I will create a microservice for each of these modules. The following microservices correspond to the application modules:

  • Customer Account Management → Account Service
  • Order Management → Order Service
  • Book Inventory Management → Book Service
  • Shipping Management → Shipping Service

The following diagram shows the architecture of this online bookshop application:

As you can see in the preceding diagram, we have four core microservices in this application. This architecture also has two more services: an API Gateway and the Shopfront UI web application, which is the user interface that can be seen on the browser. To start building our microservice project, we have to create the following individual services:

  • Config Server
  • Eureka Server
  • Account Service
  • Book Service
  • Order Service
  • Shipping Service
  • Zuul Proxy API Gateway

I have implemented these services using Spring Boot and Spring Cloud. You can use http://start.spring.io/ to generate the Spring Boot project. In this book, I haven't included the complete code structure for this application, but you can find it on GitHub: https://github.com/PacktPublishing/Mastering-Spring-Boot-2.0.

We'll look at the difference between SOAP and RESTful microservices in the following section.

主站蜘蛛池模板: 辽源市| 凉城县| 花莲县| 漯河市| 蓬莱市| 松溪县| 宝应县| 福海县| 宝鸡市| 十堰市| 布尔津县| 南郑县| 偏关县| 竹山县| 新龙县| 综艺| 赤水市| 新巴尔虎左旗| 大方县| 特克斯县| 镇坪县| 清涧县| 乐清市| 安庆市| 翁源县| 光山县| 云浮市| 菏泽市| 来安县| 青海省| 和静县| 谢通门县| 渭源县| 新兴县| 蚌埠市| 泸定县| 珲春市| 沧州市| 工布江达县| 桂阳县| 安国市|