The Development and Research Status of Software Architecture

Current status of software architecture research

The development of software architecture has gone through four stages: single architecture, distributed architecture, SOA architecture, and microservice architecture.

1.3.1 Monolithic architecture

In the early days of web application development, most web engineers integrated all functions into one project project, and deployed all functions in a war package to the server, and improved system performance by deploying application clusters and database clusters. In this mode, the project structure is simple, the initial development cost is low, the cycle is short, and the development efficiency is high. The interaction between modules uses local method calls, which is easy to deploy and test. But the shortcomings are also obvious: all functions are integrated in one project, which is not easy to develop, expand and maintain when it is larger than a large project. The version iteration speed gradually slows down. To modify a place, the entire application needs to be compiled, deployed, and started. The development and testing cycle is too long. The scalability is poor, and the horizontal expansion is achieved through the cluster method, which cannot be scaled according to the needs of a certain business.

1.3.2 Distributed Architecture

In view of the lack of a single architecture and to meet the development needs of large-scale projects in the future, many companies divide a single system into several systems according to the business vertical difference. The systems interact with each other to complete the user's business processing, and each system can be deployed in a distributed manner. , this architecture becomes a distributed architecture. The distributed architecture provides the system with load balancing capabilities, reduces the code coupling between modules, and improves the flexibility of the system. The disadvantage is that there is data redundancy, functional redundancy and high coupling between subsystems. The granularity of on-demand scaling is not enough, and it cannot be realized for different businesses in the same subsystem.
insert image description here

1.3.3 SOA Architecture

SOA is a service-oriented architecture based on a distributed architecture, which divides different business functions into services and connects them through well-defined interfaces and protocols. The advantage is to extract repeated functions as services, improve development efficiency, and improve the reusability and maintainability provided by the system. It can be scaled according to the characteristics of different services. The disadvantage is that the boundary between the system and the service is blurred, resulting in too large granularity of the extracted service, and high coupling between the system and the service. Although ESB is used, the service interface protocol is not fixed and there are many types, which is not conducive to system maintenance.
insert image description here

1.3.4 Microservice architecture

Based on the idea of ​​SOA architecture, in order to meet the needs of mobile Internet for large-scale projects and multi-clients, the service layer is divided into fine-grained divisions. Each divided service only completes a specific business function. For example, the order service only implements Order-related business, user service implementation of user management-related business, etc., the granularity of the service is very small, so it is called the micro-service architecture. The advantage is that the granularity of service splitting is finer, which is conducive to resource reuse and improves development efficiency. It is possible to formulate an optimization plan for each service more precisely, and scale as needed. Applicable to the Internet era, the product iteration cycle is shorter. But the disadvantage is also obvious that the complexity of development increases, because a business process requires multiple microservices to complete through network interaction. There are too many microservices, and the cost of service governance is high, which is not conducive to system maintenance. So it is not suitable for the architecture of small projects.

In 2014, Martin Fowler and James Lewis jointly proposed the concept of microservices. The microservice architecture can be regarded as an implementation of SOA. Netflix, which used microservices earlier, believes that microservices are fine-grained SOA. The microservice architecture is shown in Figure 1-1, and the comparison between microservices and SOA is shown in Table 1-2. Microservices split applications at a finer granularity, and each service communicates through RESTful API or RPC (Remote Procedure Call).
insert image description here

In 2016, the Pivotal team released the Spring Cloud service governance framework, which was quickly built based on Spring Boot[5]. Spring Boot improves on the basis of the Spring framework, and simplifies the cumbersome configuration of Spring by following the principle of convention over configuration. The biggest contribution of Spring lies in aspect-oriented programming (AOP, Aspect Oriented Programming) and inversion of control (IoC, Inversion of Control). At present, Spring is still in the leading position in back-end development. Spring Cloud includes the excellent features of Spring Boot, and builds a complete set of solutions including components such as service discovery and registration, service fuse, load balancing, gateway routing, and link tracking. The first generation of Spring Cloud is based on Spring Cloud Netflix. Since Spring Cloud Netflix has entered the maintenance state, the second generation is based on the open source Spring Cloud Alibaba of the Alibaba team. Currently, Spring Cloud Alibaba has been successfully incubated. Spring Cloud Alibaba integrates the excellent open source components of the Alibaba team, including Nacos, Sentinel, RocketMQ and Spring Cloud Gateway, which have been widely used.

Guess you like

Origin blog.csdn.net/qq_45473439/article/details/124093940