Project distributed deployment architecture
Distributed deployment architecture summary
Architecture core middleware Description:
Code redundancy at the front end (thymeleaf, vue.js, app, weixin h5) using the service must go through a gateway, it is easy to achieve a unified authentication, limiting, canary publishing, eliminate previously Gateway: Spring Cloud Gateway and other related issues.
OpenFeign: between the different modules used to implement the service call each other (sevice-to-service call)
Spring Cloud Consul (similar eureka, zookeeper, etc.): Registration Center
Skywalking: Implementation of Distributed Link Tracking
FastDFS: distributed file system for implementing pictures, videos, documents, uploading and downloading.
ElasticJobLite: Scheduling achieve timing
Kubernetes Cluster: The deployment vessel now
8.RabbitMQ clusters: implementation of distributed message center for business Liberation coupling, asynchronous and so on.ELK, Sentry: log platform
Maven Nexus: maven PW for Java member, NPM package, .net nuget package management.
A hierarchy of items
Project layered v2.png
The basic principle
Front-end will be used Vue.js, Thymeleaf
Vue.js completely separated front and rear ends
Project details stratified
External Interface Layer: comprising dto, enums, @FeignClient, called by other modules for
Application Layer monomer: dto comprises internal use, do (usually also called Entity, or called Model), DAO, bizinteract, ServiceImpl, publicServiceImpl
2.1 DTO information used to define the distal end, the principle is to expose little information, reducing the front end logic and back-end interaction. Note: use the entire field enumeration is defined in the external interface layer
2.2 do: define the target areas, and must not stick to one correspondence table structure.
2.3 dao & bizinteract: in fact, these two may be combined into a layer, for accessing a database, cache Redis, ES index, mq queue, and even a file system, etc., need to define and implement interfaces, code maintenance and ease of unit test. Note: mybatis this case DB access only interface.
2.4: mapper: mybatis access xml mapper DB needed.