You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "WeiChao (JIRA)" <ji...@apache.org> on 2018/01/09 06:22:00 UTC

[jira] [Created] (SCB-209) pullTask,use rev to ensure data consistency and reduce service center work load

WeiChao created SCB-209:
---------------------------

             Summary: pullTask,use rev to ensure data consistency and reduce service center work load
                 Key: SCB-209
                 URL: https://issues.apache.org/jira/browse/SCB-209
             Project: Apache ServiceComb
          Issue Type: Improvement
          Components: Java-Chassis
            Reporter: WeiChao
            Assignee: WeiChao
             Fix For: java-chassis-1.0.0-m2


When pull task,SC will return to the result with the version number X-Resource-Revision in the HEADER,SDK recodes this rev and sends it to SC at the next request.
If the rev of SDK is greater than or equal to the rev of SC, it means that SDK no need to refresh, SC doesn't need to be processed, and returns 304 to indicate that SDK's cache is not refreshed.
If the rev of SDK is less than SC's rev, SC returns the updated result set to SDK, SDK refreshes the cache and updates the Rev.
The effect is that SDK requests different SC and does not have data inconsistencies, at the same time reducing the amount of data transmission in the channel



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)