The evolution of software architecture

I talked about the essence of software architecture earlier. This article will talk about the evolution process of software architecture.

As we all know, the development of business-driven technology is an eternal truth. Businesses evolve from simple to complex. At the beginning, the business volume is small, the business complexity is low, and the technology adopted is relatively simple. With the popularization of informatization, more operations and various transactions are placed on the Internet, and the amount of information increases frequently. With the development of business, technology has increasingly higher requirements for business scalability and scalability. High concurrency, high availability, scalability, extensibility, and secure enough software architecture have always been the goals pursued by architecture design. Adopting appropriate technical architectures for different business developments and using changes to respond to changes are the goals pursued by IT people.

Today let’s take a look at what stages the architecture design goes through?

1. In the early days of the development of monolithic architecture
web applications, due to the relatively small traffic of the website, there was only one simple function. All functions could be deployed on one server,
such as an e-commerce system, which included user management and product management. , order management and other modules, we will make it into a web project and then deploy it to a tomcat server
Insert image description here

Features:
1: All functions are integrated in one project
2: All functions are packaged in a war package and deployed to the server
3: Improve system performance by deploying application clusters and database clusters

Advantages:
1: Simple project structure, low initial development cost, short cycle, preferred for small projects
2: High development efficiency, local method calls are used for interaction between modules
3: Easy to deploy, low operation and maintenance costs, directly package a complete package, Copy it to a directory in the web container and run
4: Easy to test. IDEs are designed for development unit applications and easy to test - you can start the complete system locally.

Disadvantages:
1: All functions are integrated in one project, which is difficult to develop, expand and maintain for large projects.
2: The version iteration speed gradually slows down. Modifying one place to compile, deploy, launch, develop and complete all Zhengege applications is too long.
3: Unable to scale on demand, horizontal expansion is achieved through clustering, and cannot be scaled on demand for a certain business.

  1. Vertical application architecture

As the number of visits increases, a single application can only respond by adding nodes. At this time, it is found that some modules have high visits and some have low visits. The so-called vertical application architecture is to split the original application into several unrelated applications to improve efficiency.

Insert image description here

advantage:

1: System splitting realizes traffic sharing and solves concurrency problems to a certain extent.
2: Can be optimized and expanded for different modules
3: Problems in one system will not affect other systems, and the single point fault tolerance rate is improved

shortcoming:

1: The systems are independent of each other and cannot communicate.
2: The systems are independent of each other and there will be repeated development tasks.

  1. Distributed architecture

In response to the shortcomings of the monolithic architecture, in order to meet the development needs of large-scale projects, many companies vertically split a monolithic system into several systems based on business. The systems
interact with each other through the network to complete user business processing. Each system can be deployed in a distributed manner. , this architecture is called a distributed architecture.
Insert image description here

Features:
1. Vertically split into individual systems based on business. This architecture is also called vertical architecture.
2. There is data redundancy and coupling between systems. As shown in the figure above, all three projects have customer information.
3. Most of the interfaces between systems are for data synchronization. For example, the three projects in the figure above need to synchronize customer information.

Advantages:
1. Through vertical splitting, each subsystem becomes a small system with simple functions, low initial development cost, and short cycle.
2. Each subsystem can be scaled as needed.
3. Each subsystem can use different technologies.

Disadvantages:
1. There is data redundancy, functional redundancy and high coupling between subsystems.
2. On-demand scaling is not granular enough and cannot be implemented for different businesses in the same subsystem, such as order management and user management.

  1. SOA architecture

SOA is a service-oriented architecture based on a distributed architecture, which splits different business functions into services and
links them through well-defined interfaces and protocols between these services.
Insert image description here

Advantages:
1. Extract repetitive functions into services, improve development efficiency, and improve the reusability and maintainability of the system.
2. It can be scaled on demand according to the characteristics of different services.
3. Use ESB to reduce interface coupling in the system.

Disadvantages:
1. The boundaries between systems and services are blurred, which will lead to excessive granularity of extracted services and high coupling between systems and services.
2. Although ESB is used, the service interface protocols are not fixed and come in many varieties, which is not conducive to system maintenance.

  1. Microservice architecture

Based on the idea of ​​SOA architecture, in order to meet the needs of mobile Internet for large-scale projects and multiple clients, the
service layer is split into fine-grained parts. Each split service only completes a specific business function.
For example, the order service only implements Order-related businesses, user services implement user management-related businesses
, etc. The granularity of the services is very small, so it is called a microservice architecture.
Insert image description here

Features:
1. The service layer is split into microservices one by one according to business.
2. Microservices have a single responsibility.
3. Lightweight protocols such as RESTful and RPC are used for transmission between microservices.
4. It is conducive to the adoption of front-end and back-end separation architecture.

Advantages:
1. The granularity of service splitting is finer, which is conducive to resource reuse and improves development efficiency.
2. The optimization plan for each service can be formulated more accurately and scaled as needed.
3. Suitable for the Internet era, the product iteration cycle is shorter.

Disadvantages:
1. The complexity of development increases because a business process requires multiple microservices to be completed through network interaction.
2. Too many microservices lead to high service management costs and are not conducive to system maintenance.

Guess you like

Origin blog.csdn.net/weixin_49543015/article/details/131596525