[Architecture] Thoughts on the evolution of Java system architecture

1 Introduction

With the development of the mobile Internet, the application scale of websites, H5, and mobile terminals has also continued to expand, and both the quantity and quality of applications have been improved exponentially. The number of developers is increasing day by day, and the complexity of applications is also increasing. How to quickly complete the delivery of functions and coordinate a large number of developers to work together is a complex system engineering. From the beginning of the Internet to the present, the system architecture has generally gone through several processes: single application architecture, vertical application architecture, distributed architecture, SOA architecture, and micro-service cloud architecture. In this article, I will introduce the evolution process of the architecture and my own thinking.

2 Monolithic Application Architecture

In the early days of Internet development, the traffic of its website application was small, and all functional codes and data storage were on one server, which could reduce the cost of development, deployment and maintenance projects. At this stage, the front-end and back-end are generally not separated, and multiple application services are deployed under one tomcat. Common tech stacks include spring+mybaits+jspor spring+mybaits+freemaker. The advantage of this method is single-person maintenance and fast development pace. The disadvantage is that it is not suitable for large-scale projects, the coupling between modules is large, and the single-point fault tolerance rate is low.

insert image description here

3 Vertical Application Architecture

The background of the emergence of the vertical application architecture is that the number of visits to the website is increasing, and a single application can also add nodes to deal with it, but not all modules need to increase service capabilities, so it is necessary to split the service according to the function. Expand the capacity of a large number of modules. The splitting of the system shares the traffic, solves the problem of concurrency, and can also divide and optimize different functional modules. In addition, the problem of one system will not affect other systems, which improves the fault tolerance rate between systems. This is a vertical application. At the same time, various systems cannot be called, and there will be duplicate function codes. In addition, for the management system, session session retention is also a huge problem. In this mode, the mode of tomcat session replication is generally used, and resource The consumption is relatively large.
insert image description here

4 Distributed architecture

In a distributed system, the repeated code in the system will be extracted separately as an independent service. The original vertical system is divided into an independent service layer and a specific business presentation layer. This architecture improves code reusability , but the complexity and coupling between systems increase, making project maintenance more difficult.

insert image description here

5 SOA architecture

For the SOA architecture, a service registration center is introduced on the basis of the distributed architecture to decouple the presentation layer and the service layer, which greatly solves the difficulty of system operation and maintenance. Under the SOA architecture, the structure of ssm framework + dubbo + zk can be said to be all the rage. Under the SOA architecture, the further splitting of services can maximize the effectiveness of personnel. Under this architecture, the separation of the front and back ends is also achieved, which further improves the development efficiency. The back end and the front end each focus on In its own field, the complexity of the system has further increased.
insert image description here

6 Microservice Cloud Architecture

In the era when everything is connected to the cloud and everything is connected to the cloud, the architecture of microservices emerges as the times require. The microservice architecture further splits services and introduces various system components for service governance, service monitoring, link tracking, authentication and authorization. In this scenario, each service component is more specialized, not only service registration and discovery, but also configuration center, link tracking, etc., microservice family bucket (springcloud springcloud alibaba).
Comparison of SOA architecture and microservice architecture service capabilities:

Optional technical solutions for each component of SpringCloud.

insert image description here

7 summary

In this article, we mainly introduce the evolution path of the service architecture in the past 10 years, as well as the advantages and disadvantages of each architecture. Now is the era of the Internet of Everything and everything on the cloud. Microservices are currently a very popular solution for large-scale projects. However, in the actual project development, the actual situation must also be considered. The positioning and development of the project should not be over-developed. The most popular solution is not necessarily the best, but the architecture that best suits the business scenario should be chosen. , so that the delivery and iterative update of the project can be guaranteed.

Guess you like

Origin blog.csdn.net/u011397981/article/details/132128670