Service Governance Platform: Comparison and Differences between SOA and Microservice Architecture

1. Scene introduction

If we open the Alipay homepage and look at our balance, it will display your total assets, yesterday's income, accumulated income and other information. If the information displayed on this page comes from different systems/applications, we display the data through various interfaces. If we want to display these data on the front-end page now, how should we display it?

  • In this case, it is impossible for us to let the client communicate with 6 different applications/systems one by one to complete the display of data. Instead, 6 applications/systems communicate with each other to complete the call. In the end, the client only needs to call an interface to obtain data, instead of communicating with each application/system.
  • In an e-commerce system, such as Taobao, we will display a lot of data information on the homepage, such as homepage information, product information, personal information, push information, and so on. If the data displayed on the homepage comes from 100 different applications/systems, then through the above architecture, we will have hundreds or even thousands of communication interactions on the backend, and the backend structure will become very large and complex. . So under this architecture, we need to make some adjustments to the above structure, so we introduced the SOA architecture

Insert image description here
Insert image description here

2. Service-oriented architecture SOA

SOA (full name: Service Oriented Architecture) means "service-oriented architecture" in Chinese. You can understand it as an architectural model or a design method, not a service solution.

  • It contains multiple services, which communicate with each other through mutual dependence or communication mechanisms, and ultimately provide a series of functions. A service usually exists in an independent form and in the operating system process. Each service is called through the network.
  • We remove all communication between each application and introduce an ESB enterprise bus in the middle. Each service only needs to communicate with the ESB . At this time, the interaction between each application will become clearer, and the business Architecture/logic, etc., will also become clear. The originally messy and unplanned system was transformed into a planned and manageable system. In this process, the biggest change was the introduction of the ESB enterprise bus.
    Insert image description here

Insert image description here

  • Service bus, service provider, business process reconstruction, service addressing, distributed transaction model
    Insert image description here

3. Microservice architecture

Microservice architecture is actually similar to SOA architecture. Microservices are a sublimation of SOA. One of the key points emphasized by the microservice architecture is that "business needs to be completely componentized and service-oriented" . The original single business system will be split into multiple small applications that can be independently developed, designed, and run. Such small applications collaborate and communicate with each other to complete interaction and integration. This is the microservice architecture.

  • Componentization: A component represents a unit that can be replaced and upgraded independently. Take a PC as an example. The CPU, memory, graphics card, and hard disk in a PC can be replaced and upgraded independently without affecting other units. If we build the PC as a service as a component, then this PC only needs to maintain the motherboard and some necessary external devices. CPU, memory, and hard disk all provide services in the form of components. The PC needs to call the CPU for calculation processing. It only needs to know the address of the CPU component.

Insert image description here

  • Microservices not only bring about a series of problems such as service splitting, orchestration management, continuous integration, and deployment, but there are also many problems within microservices. In response to a series of problems caused by enterprises using microservice architecture, there is a service governance platform .
    Insert image description here

4. Comparison and connection

  • SOA is more suitable for large, complex, and heterogeneous enterprise-level systems.
    The typical feature of this type of system is that many systems have been developed for many years, and each service is heterogeneous. For example, different enterprise-level technologies are used, some are developed internally, and some are purchased externally. They cannot be completely replaced or optimized on a large scale . and refactoring. Because the cost and impact are too great, it can only be handled in a compatible way , and the one responsible for the compatibility task is the ESB.

  • Microservices are more suitable for fast, lightweight, Web-based Internet systems.
    The business of such systems changes rapidly and requires quick trial and fast delivery . At the same time , they are basically based on the Web , although the development technologies may vary greatly (for example, Java, .NET, PHP, etc.), but the external interfaces basically provide HTTP RESTful style interfaces , and there is no need to consider processing at the interface layer similar to SOA's ESB.

  • Service granularity
    The service granularity of SOA is coarser, while the service granularity of microservices is finer. For example, for an e-commerce company, the product management system is a service in an SOA architecture; if a microservice architecture is adopted, the product management system will be split into more services, such as basic product information management, supplier management, etc. Management, warehousing management and more services.

  • Service communication
    SOA uses ESB as the key component of inter-service communication, responsible for service definition, service routing, message conversion, and message delivery, which are generally heavyweight implementations. Microservices use unified protocols and formats, such as HTTP RESTful protocol and TCP RPC protocol, and do not require heavyweight implementations such as ESB.

  • Service delivery
    SOA has no special requirements for service delivery, because SOA is more concerned with compatibility with existing systems ; the architectural concept of microservices requires rapid delivery, and accordingly requires automated testing, continuous integration, automated deployment, and automated operation and maintenance. best practices etc.

Insert image description here

Insert image description here

Insert image description here

5. Service management platform

SOA (service-oriented architecture) service governance platform is a specific software tool or platform built on the basis of SOA architecture to support and manage service-oriented architecture in enterprises. It is a part of SOA and is used to solve the challenges and needs faced when implementing and managing SOA architecture.

  • Scope and positioning: SOA is a software design pattern or architectural paradigm that builds systems by dividing applications into a series of independent and reusable services . It focuses on the design, implementation and integration of services. The SOA service governance platform is a management platform designed for the SOA architecture . It is used to manage and monitor services in the enterprise, including service registration, discovery, version control, security management, etc.
  • Functions and features: The SOA service governance platform provides a series of specific functions and tools to solve the governance needs in SOA architecture. It usually includes service registry/warehouse, service life cycle management, service monitoring and management, security and access control, service version control, service contract management and other functions. SOA itself does not clearly define or provide specific governance functions. It places more emphasis on the organization and integration of services .
  • Purpose and value: The purpose of the SOA architecture is to achieve loose coupling, reusability and flexibility of the system and provide service-oriented solutions. **The purpose of the SOA service governance platform is to enhance the manageability, controllability and scalability of the SOA architecture. **It helps enterprises better organize, manage and maintain services and improve system stability and reliability by providing management and monitoring tools.

When it comes to specific examples, we can use an enterprise's SOA architecture as the background to illustrate the difference between an SOA service governance platform and SOA.

  • Assume that an enterprise adopts SOA architecture to build its business system and divides different business functions into independent services. These services may include order services, payment services, user management services, etc.
  • In this case, SOA architecture focuses on how to design, implement and integrate these services to achieve loose coupling and reusability of the system.
  • However, as the number and complexity of services increases, enterprises may face some specific challenges, such as:
    Service discovery and reuse: As the number of services increases, how to easily discover and reuse existing services and avoid duplication of development , improve development efficiency and system maintainability.
    Version control of services: When services are changed or upgraded, how to manage different versions of services and ensure version compatibility between services to avoid system instability or functional conflicts.
    Security management of services: How to ensure that only authorized users or systems can access and use services, while protecting the security of services and data to prevent potential security threats.
    Monitoring and management of services: How to monitor the performance, availability and health status of services in real time, discover and solve potential problems in a timely manner, and ensure the stable operation of services.
  • In order to solve these challenges, enterprises can introduce SOA service governance platform as an auxiliary tool. The platform can provide the following functions:
    Registry/warehouse: As a centralized storage of services, it records metadata information of services, including interface definitions, version information, access permissions, etc. This way, developers can easily find existing services and reuse them.
    Service version control: The governance platform can track and manage different versions of services, and provide mechanisms to manage service upgrades and rollbacks. This way, version compatibility between services is ensured and potential conflicts and issues are avoided.
    Security and access control: The governance platform provides security mechanisms such as authentication, authorization, and encryption to ensure that only authorized users or systems can access and use services and protect the security of services and data.
    Service monitoring and management: The governance platform can monitor the performance indicators, call status, error rate, etc. of the service in real time, helping administrators identify and solve problems and ensure the stable operation of the service.
  • By introducing an SOA service governance platform, enterprises can better manage and control services in their SOA architecture .
    The platform provides a series of tools and functions to help enterprises solve specific challenges in SOA architecture and improve the manageability, controllability and scalability of the system.

Microservices and microservice governance platform:

  • Microservices:
    User services: Responsible for handling user registration, login, personal information management and other functions.
    Order service: responsible for processing order creation, payment status management and other functions.
    Payment service: Responsible for processing payment requests, payment callbacks and other functions.
    Product Services: Responsible for handling product lists, details, inventory management and other functions.
  • Microservice governance platform:
    The microservice governance platform is an auxiliary tool that helps enterprises manage and monitor individual microservices in the microservice architecture. It provides the following functions:
    Service registration and discovery: Register each microservice into the service registry of the governance platform so that other microservices can discover and call them. For example, each microservice will register its own service information with the governance platform when it is started, including service address and interface definition.
    Load balancing and fault tolerance: The governance platform can implement load balancing strategies, reasonably allocate requests to available microservice instances, and improve system performance and reliability. When a microservice instance fails, the management platform can automatically forward the request to other available instances to implement a fault-tolerant mechanism.
    Service monitoring and tracking: The governance platform provides real-time monitoring and statistics of microservice performance indicators, such as request response time, error rate, etc. It can also record request tracking information to help developers debug and troubleshoot problems in a distributed environment.
    Security and access control: The governance platform provides security mechanisms to ensure that only authorized services or clients can access specific microservices. It can provide authentication, access token management, API keys and other functions to protect the security of microservices.
    Configuration management: The governance platform can centrally manage the configuration information of microservices, such as database connections, addresses of third-party services, etc. This way, the configuration can be modified dynamically at runtime without having to redeploy the microservice.
  • In the above example of e-commerce application, the microservice governance platform acts as a centralized management and monitoring tool to help enterprises better organize and manage microservice architecture. It provides functions such as service registration and discovery, load balancing and fault tolerance, service monitoring and tracking, security and access control, and configuration management to enhance the manageability, controllability, and scalability of the microservice architecture.

Microservice governance platforms are suitable for microservice architectures, handle large numbers of small microservice instances and complex service communications, and are often integrated with modern microservice technology stacks.
SOA governance platforms are suitable for service-oriented architectures, handle fewer service instances and relatively simple service communication, and are usually integrated with traditional middleware and ESB.

  • Granularity and Scale:
    Microservices Governance Platform: Microservices architecture emphasizes splitting applications into multiple small, autonomous microservices , each focused on a specific business function. Therefore, microservice governance platforms usually need to handle communication and coordination between a large number of microservice instances and complex services .
    SOA governance platform: Services in the SOA architecture can be more coarse-grained and can be larger business components or application modules . Therefore, SOA governance platforms typically handle fewer service instances and relatively simple service communication .

Large projects often prefer to use microservices architecture instead of traditional SOA architecture. Microservice architecture has the following advantages when handling large projects:

  • Modularity and maintainability: Microservices architecture splits applications into a set of small, autonomous services, each focused on a single business function. This modular structure makes the system easier to understand, develop and maintain. Teams can develop and test each microservice independently without impacting the entire system.
  • Elasticity and scalability: The microservice architecture allows each microservice to independently scale horizontally and allocate resources as needed. This elasticity and scalability enables the system to handle high traffic and load and better handle peak situations.
  • Technology diversity: Microservices architecture encourages the use of the best technology stack and tools for each microservice. This allows teams to choose the technology that best suits their business needs without being locked into a single technology stack. This is especially important for large projects, which may require the integration of multiple systems and technologies.
  • Independent deployment and operability: The microservice architecture allows each microservice to be deployed and operated independently without affecting other microservices. This independence simplifies maintenance and troubleshooting of the system and reduces risk to the overall system.

Although microservices architecture is becoming more and more popular in modern application development, SOA still has some advantages, especially in certain situations:

  1. Unified data model and standards: SOA architecture emphasizes the use of unified data models and standards to define and exchange services. This consistency facilitates integration and collaboration between disparate systems, reducing the complexity of data conversion and mapping. SOA uses standards such as XML and SOAP to make communication between different platforms and technologies easier.

  2. Centralized management and governance: SOA architecture usually uses a centralized management and governance model. This means aspects such as registration, discovery, security, versioning and access control of all services can be centrally managed and controlled. This centralized management and governance model is easier to implement and maintain in certain scenarios.

  3. Suitable for traditional enterprise environments: SOA architecture has been widely adopted over the past few decades, especially in traditional enterprise environments. Many enterprises have extensive SOA infrastructure and related technologies, which makes it easier to extend and improve existing SOA systems than to fully adopt microservices.

  4. Reuse and sharing: SOA architecture encourages the reuse and sharing of services. By defining common services, different departments and applications can share and reuse these services, thereby improving development efficiency and resource utilization.

  5. Mature tools and solutions: Due to the long history of SOA architecture, there are many mature tools and solutions available for SOA development, integration and management. These tools and solutions provide a complete set of capabilities, including service registration, discovery, messaging, transaction management, and more.

Although SOA has the above advantages, in some aspects the microservice architecture is more suitable for the needs of modern application development. Microservices architecture provides greater flexibility, scalability, and independence, allowing teams to iterate and deliver new features faster. At the same time, the microservice architecture is more suitable for building complex distributed systems and supports diverse technology stacks and team autonomy. Therefore, when choosing an architecture, factors such as project needs, team capabilities, and existing infrastructure need to be considered.

References: 1 , 2 , 3 , 4 , 5

Guess you like

Origin blog.csdn.net/qq_33957603/article/details/132941301