Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Third-Party Software Version Management Policy

Updated on 2024-09-30 GMT+08:00

During system upgrade and reconstruction, third-party software conflict is the most common issue. With the rapid development of software iteration, the traditional software compatibility management policy is no longer suitable for the development of software.

This section describes the best practices of third-party software management to help you build a continuously evolving application system.

Open-Source Software Selection

Major open-source communities, such as Spring Boot and Spring Cloud, maintain multiple versions. For example, Spring Cloud has versions such as Hoxton, Greenwich, and 2020.0.x, most of which are no longer maintained. Most open-source software has two versions: one is the latest development version, and the other is the recent maintenance version.

For open-source software selection, follow the version development pace of the community and use the latest maintenance version. There is no strict conclusion on the selection of development and maintenance versions. The selection depends on the specific product functions. For example, if the product competitiveness depends heavily on the features of a third-party software, the development version is preferred. If the product depends on stable features of a third-party software and does not use new functions, the maintenance version is preferred.

You are not advised to select a version that is no longer maintained by the community or a version that is still under maintenance but has been released for more than half a year. Although no function issues are found in these versions, the continuous evolution of the product will be severely affected:

  1. Software security vulnerabilities cannot be handled in a timely manner. The discovery and exploitation of security vulnerabilities take a certain period of time. If the earlier version is used for a long time, security vulnerabilities are more likely to be exploited, making the system more vulnerable to attacks.
  2. When the system is faulty, it is more difficult to seek community support. Versions that are no longer maintained or have been released for more than half a year can hardly be supported.
  3. System evolution becomes more difficult. When new features need to be added to the system and new development tools need to be introduced, it is more difficult for earlier versions to be compatible with the new development tools.
  4. Many faults may have been rectified in later versions, and the code maintainability and performance of later versions are better than those of earlier versions.

Therefore, the best solution to open-source software selection is to select the development or maintenance version provided by the community for maintenance and upgrade, drive the upgrade to the latest version based on the issue, and periodically upgrade to the latest version every quarter.

Third-Party Software Version Management

The following uses an example to describe the principle of third-party component conflict. Assume that project X needs to reference the components provided by both project A and project B. Project A and project B depend on project C, but the version numbers of the two projects are different.

  • POM of project X
    <dependency>
      <groupId>groupA</groupId>
      <artifactId>artifactA</artifactId>
       <version>0.1.0</version>   
    </dependency>
    <dependency>
      <groupId>groupB</groupId>
      <artifactId>artifactB</artifactId>
      <version>0.1.0</version>   
    </dependency>
  • POM of project A
    <dependency>
      <groupId>groupC</groupId>
      <artifactId>artifactC</artifactId>
      <version>0.1.0</version>   
    </dependency>
  • POM of project B
    <dependency>
      <groupId>groupC</groupId>
      <artifactId>artifactC</artifactId>
      <version>0.2.0</version>   
    </dependency>

When project X is finally released, the following situations may occur:

  • Version 0.2.0 of project C is used. Because project A is compiled and tested using version 0.1.0, component A may not work properly. For example, version 0.2.0 is incompatible with version 0.1.0, and project A uses these incompatible interfaces.
  • Version 0.1.0 of project C is used. Because project B is compiled and tested using version 0.2.0, component B may not work properly. For example, project B uses the new interfaces provided by version 0.2.0.

If the interface of component C used by project A is incompatible with that used by project B, project X cannot work properly no matter how the interface is adjusted. The code of project A must be modified and tested using the same or compatible version as that of project B. A new version must be released for project X.

Therefore, the best policy for dependency management is to ensure the dependency of common components and use a later version. However, there are often a number of issues, especially when the project dependencies are very complex.

Currently, the dependency management mechanism is used to manage the dependency of mainstream complex projects. Dependency management has been proved to be an effective method for managing dependencies and therefore is widely used in open-source communities. For example, for Spring Boot, Spring Cloud, and Spring Cloud Huawei, you can view the source code directory structure of Spring Cloud Huawei to learn about how to use dependency management.

For a complex project, for example, the Spring Cloud Huawei project, the POM file related to dependency management includes:

/pom.xml # Root directory of the project.
/spring-cloud-huawei-dependencies/pom.xml # Main dependency of the project . All the statements related to the dependency management are in this file.
/spring-cloud-huawei-parents/pom.xml # parents is used by sub-modules of the project and project developers, which is similar to the parent provided by Spring Boot
/spring-cloud-huawei-bom/pom.xml # BOM is used when project developers expect to introduce the components provided by Spring Cloud Huawei into the dependency management of the project instead of introducing the third-party software versions on which Spring Cloud Huawei depends.

The POMs of Spring Cloud Huawei are relatively complete. They provide developers with POMs that can be introduced from different perspectives and are applicable to common development components.

Generally, a microservice development project may contain only the /pom.xml file. The parent and dependency management of the project are declared in the /pom.xml file. After dependency management is introduced, all dependency statements in the project do not specify the version number. In this way, when the third-party software version needs to be upgraded, you only need to modify dependency management in the /pom.xml file.

You can use the Spring Cloud Huawei samples to understand the principle and function of dependency management:

  1. Run the mvn dependency:tree command to check the project dependency.
  2. Modify spring-boot.version in the /pom.xml file and run the mvn dependency:tree command to check the dependency relationship changes of the project.
  3. Adjust the positions of spring-boot-dependencies and spring-cloud-dependencies in the /pom.xml file, and run the mvn dependency:tree command to check the dependency relationship changes of the project.

When the number of third-party software on which a project depends increases, it is difficult to identify the mapping between software. In this case, you can follow the version mapping of Spring Boot and Spring Cloud. It is a good choice to use spring-boot-dependencies and spring-cloud-dependencies as the basis for dependency management. Because Spring Boot and Spring Cloud are widely used, the community can fix compatibility issues in a timely manner. Developers only need to upgrade Spring Boot and Spring Cloud versions and do not need to pay attention to the versions of other third-party software on which Spring Boot and Spring Cloud depend.

Upgrading third-party software can promote continuous software improvement, but engineering capabilities, such as automatic test capabilities, need to be improved.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback