Dubbox Server configuration for multi-version release of the APP

Source: Internet
Author: User

Scenario: Small L recently released the app when it comes to a headache, because the Apple App Store needs audit reasons, the project needs to deploy the latest version, but can not affect the normal use of the version;

Analyze the problem: if it's an app-related bug, or a pre-release version

Solution: Configure Dubbo Multiple Versions

<dubbo:protocol id= "Customerrest" name= "Rest" port= "xxxxx"/><!--ref: Service implementation to inject--><dubbo:service Interface= "Com.jlj.erp.app.dubbo.service.customer.CustomerApi" ref= "Customerapi" version= "1.0" group= " Group-customer "protocol=" Customerrest "timeout=" 60000 "/><!--ref: Service implementation to inject--><dubbo:service Interface= "Com.jlj.erp.app.dubbo.service.customer.CustomerApi" ref= "Customervapi" version= "1.1" group= " Group-customer "protocol=" Customerrest "timeout=" 60000 "/>

Implement the same interface, Only the corresponding version of the interface from 1.0 to 1.1, according to the requirements of the 1.1 version of the interface implementation, so that when the release, the new and old interface will coexist, if you need to force the update audit after the old version (1.0 version of the code removed) to stop running the new version, if you do not need to force the update, it can coexist

Client calls, small L with Dubbox so different versions configure different paths to

HTTP://127.0.0.1:80/A//XXX/V1 (old) @GET @path ("/xxx/v1") public Apiresult xxx (@QueryParam ("code") String Resourcecode) Http://127.0.0.1:80/a//xxx/v2 (new) @GET @path ("/xxx/v2") public Apiresult xxx (@QueryParam ("code") String Resourcecode)

If the data structure is changed, small l do not recommend this way

This situation requires a specific solution, can be deployed separately, can be pre-release environment, deployment of 1 with the new table structure and objects of the test database (pre-release environment).

For the larger changes, the product added new heavyweight features, the business level or the underlying table structure is incompatible, the recommendation is to do a mandatory upgrade.


Dubbox Server configuration for multi-version release of the APP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.