BladeX - Well-designed Microservice Architecture

Preamble

Introduction:

BladeX is a SpringCloud microservice architecture upgraded and optimized from a commercial-grade project. It uses Java8 API to reconstruct the business code.
All follow Alibaba coding standards. Adopt core technologies such as Spring Boot 2, Spring Cloud Greenwich, Mybatis, etc.
Two front-end frameworks based on React and Vue are used to quickly build an enterprise-level SaaS microservice system platform.
Official website address:
Official website address: https://bladex.vip
Technical Community: https://sns.bladex.vip
Code private library: https://git.bladex.vip
Demo address:
Saber - based on Vue: https://saber.bladex.vip
Sword - React based: https://sword.bladex.vip
Archer - Almighty Code Generation System: https://archer.bladex.vip

1. What is BladeX

  • BladeX is a core technology based on Spring Boot 2 & Spring Cloud Greenwich & Mybatis for rapid construction
  • The basic framework for large systems.
  • It has been in stable production for nearly a year, and has experienced the technical architecture from Camden->Greenwich and the FatJar->Docker-
  • > K8S+Jenkins deployment architecture.
  • Adopting the mode of separation of front and back ends, two front-end frameworks are developed: Sword (based on React, Ant Design), Saber (based on Vue,
  • ElementUI).
  • The back-end adopts the SpringCloud series, which highly encapsulates its basic components, and creates a separate back-end core framework: BladeX-Tool.
  • BladeX-Tool has been pushed to Maven's private library, directly introducing modules and dependencies to reduce engineering, and can focus more on business development.
  • Integrate Sentinel to protect the stability of services from multiple dimensions such as flow control, circuit breaker degradation, and system load protection.
  • The registration center and configuration center select Nacos, which reduces the size of the project and strengthens the linkage between modules.
  • The package integrates data permissions based on annotations + Web visualization, flexible configuration, and takes effect directly without restarting.
  • A lightweight and highly scalable dynamic gateway based on Nacos is customized, which perfectly supports multi-team development.
  • Elaborately designed and integrated with minio, it perfectly supports oss object storage requirements in multi-tenant mode.
  • Traefik reverse proxy, listening for background changes to automatically apply new configuration files.
  • The Oauth2 protocol is integrated, which perfectly supports the access and authentication authorization of multiple terminals.
  • The project subcontracting is clear, and the development mode of microservices is standardized.

2. Why BladeX

  • After a long period of online production, I have accumulated many solutions to the pain points of enterprises.
  • A set of codes is compatible with MySql, Oracle, and PostgreSQL to meet the needs of various enterprise scenarios.
  • It integrates functions that many enterprises urgently need, such as multi-tenancy, Oauth2 authorization and authentication, workflow, distributed transactions and so on.
  • Integrate the latest version of ELK, with beautiful interface and powerful functions. At the same time, the log module is deeply customized to support the distributed log tracking function.
  • It deeply customizes the Flowable workflow, perfectly supports the scenarios of Spring Cloud distributed services, and operates in the form of remote calls.
  • The core driver has been upgraded, and the new functions can be used out of the box, while the open source version needs to spend more time to integrate it, and it takes more time to integrate it.
  • Book.
  • Embracing the era of microservices, due to project transformation or upgrades, many enterprises are unable to meet the requirements of traditional technologies and will instead spend more costs. BladeX
  • was born for this.
  • At the same time, SpringCloud version and SpringBoot version are provided. The APIs of the two versions can be seamlessly connected with Sword and Saber, which is suitable for small projects.
  • Escort to large projects

3. System Architecture

Architecture diagram

Architecture Introduction
  • Build core architecture based on SpringBoot2, SpringCloud Greenwich, Mybatis
  • Adopt Oauth2 protocol for unified Token issuance and authentication to ensure system security
  • Use Gateway for unified forwarding of gateways, and use Traefik proxy in production environment
  • Microservices are uniformly registered to Nacos, and Nacos acts as the registration center and configuration center
  • Use Feign to make remote calls, Ribbon to load, and Hystrix to fuse
  • Sentinel is used for current limiting to ensure the overall performance of the system
  • Integrate Seata to escort distributed transactions
  • It has the ability to integrate log collection and monitoring services
  • Support FatJar, Docker, K8s, Alibaba Cloud and other deployment methods

4. Core functions

BladeX Features

The main features of BladeX at a glance

 

 

BladeX Core Features at a Glance 

serial number
Main features Feature description
1, Front and rear separation
Adopting the front-end and back-end separation mode, the front-end provides two sets of architectures, Sword is based on React, Saber is based on
Seen
2, Distributed monolithic backend architecture
Provide two sets of back-end architectures, a distributed architecture based on SpringCloud and a single architecture based on SpringBoot
3.
API fully compatible
Two sets of back-end architectures and two sets of front-end architectures, a total of four sets of architectures can be combined arbitrarily, and all APIs are fully compatible
4.
Front-end and back-end code generation
Customize two sets of front-end and back-end code generation templates, easily generate front-end and back-end codes of the entire module, and reduce repetitive workload
5.
Componentized and plug-in architecture
Introduce out-of-the-box use of each starter for deep customization of functions, decoupling the entire architecture to improve efficiency
6.
Greenwich
SpringCloud overall version upgrade to Greenwich
7.
Nacos
Integrate Alibaba's Nacos to complete unified service registration and configuration
8,
Sentinel
Integrate Sentinel to protect the stability of services from multiple dimensions such as flow control, circuit breaker degradation, and system load
9,
Dubbo
Perfectly integrates the latest version of Dubbo, supports remote RPC calls
10.
multi-tenant system
Complete SaaS multi-tenant architecture
11.
Auth2
Integrated Oauth2 protocol, perfectly supports multi-terminal access and authentication authorization
12.
Workflow
In-depth customization of the Flowable workflow of Spring Cloud distributed scenarios to escort complex processes. Also provide
SpringBoot integrated version
13.
Standalone Process Designer
Provide an independent and fully finished process designer to easily customize the process model
14.
dynamic gateway
Integrate a lightweight, highly scalable dynamic gateway based on Nacos
15.
Dynamically aggregate documents
Implement Nacos-based Swagger SpringCloud
Aggregate documents
16.
Distributed file service
Integrate excellent third parties such as minio to provide convenient file upload and management
17.
Multi-tenant object storage system
In the SaaS system, each tenant can upload their own configuration files to their own private OSS
18.
authority management
Well-designed permission management scheme, role permissions are accurate to buttons
19.
Dynamic interface permissions
Highly flexible dynamic interface permissions, providing two configuration methods of annotation + web visualization, and the web configuration takes effect directly without restarting
20.
Multi-tenancy top menu configuration
Provides an independent top menu configuration module for each tenant, which can customize the top menu switch
twenty one,
Dynamic Data Permissions
Highly flexible dynamic data permissions, providing two configuration methods of annotation + Web visualization, and the Web configuration takes effect directly without restarting
twenty two,
Compatible with mainstream databases
A set of codes is fully compatible with the three mainstream databases of Mysql, Postgresql and Oracle
twenty three,
Dynamic Gateway Authentication
Nacos-based dynamic gateway authentication, which can be configured online and takes effect in real time
twenty four,
Almighty code generator
Support custom models, templates, business modeling, support multiple template engines, online configuration. Greatly improve development efficiency, no longer worry about duplication of work.
25.
Seata Distributed Transaction
Customized integration of Seata, support for distributed transactions, no code intrusion, flexibility and simplicity
26.
Turbine cluster monitoring
Integrated Turbine cluster monitoring, easy to view the real-time status of hystrix
27.
Zipkin link tracking
Integrate Zipkin distributed link tracking to quickly find the call chain of each request
28.
Distributed log module
Integrate 7.x version ELK, support distributed log tracking function
29.
DingTalk monitoring alarm
Enhanced monitoring, integrated DingTalk alarms for the upper and lower limits of microservices
30.
Distributed Task Scheduling
Minimalist integration of xxl-job, support for distributed task scheduling
31.
message queue
Message queues such as Rabbit, Spring CloudStream, etc.
32.
Distributed lock
A high-performance, easy-to-use distributed lock plug-in based on Redisson encapsulation
33.
More features to come
BladeX is under continuous development, so stay tuned

Guess you like

Origin blog.csdn.net/weixin_72076848/article/details/125634657