Deduplication of refresh entries in a multi-consumer versioning system
View Patent ↗Techniques are provided for reducing the amount of information to be transmitted to a user about resources of a cloud infrastructure, while allowing the information available to the user to remain current relative to the state of the resources in the cloud infrastructure. A cache ring is generated for a resource type, and the cache ring comprises a plurality of entries corresponding to objects associated with a resource/resources of the resource type in the cloud infrastructure. The plurality of entries includes a set of entries corresponding to a full refresh having a start index and an end index of the cache ring. When a subscription request is received from a user interface, a partial refresh is performed for the user interface based on the full refresh if certain conditions are satisfied, otherwise, another full refresh is performed for the user interface.
1 . An apparatus, comprising:
one or more processors; and
one or more non-transitory computer readable media storing instructions which, when executed by the one or more processors, cause the one or more processors to:
generate a cache ring for a resource type, wherein the cache ring comprises a plurality of entries corresponding to objects associated with a resource of the resource type in a cloud infrastructure, wherein the plurality of entries corresponds to a plurality of version numbers, and wherein the plurality of entries comprises a first set of entries corresponding to a first full refresh having a first start index and a first end index of the cache ring;
receive, from a user interface, a subscription request that either lacks a version number or provides the version number that is not included in the plurality of version numbers; and
in response to the subscription request, when a current index of the cache ring satisfies a partial refresh condition, fails to meet a full refresh condition, or both, perform a partial refresh based on the first full refresh.
2 . The apparatus of claim 1 , wherein the first full refresh is the only full refresh performed between the first start index and the current index.
3 . The apparatus of claim 1 , wherein the partial refresh uses at least one entry of the first set of entries.
4 . The apparatus of claim 1 , wherein the execution of the instructions further causes the one or more processors to:
in response to the subscription request, when the current index of the cache ring fails to meet the partial refresh condition, satisfies the full refresh condition, or both, perform a second full refresh having a second start index and a second end index of the cache ring.
5 . The apparatus of claim 1 , wherein the partial refresh condition comprises a comparison between a first number of entries between the current index and the first end index and a second number of entries between the first end index and the first start index.
6 . The apparatus of claim 5 , wherein the execution of the instructions further causes the one or more processors to:
in response to the subscription request, when the current index of the cache ring fails to meet the partial refresh condition, perform a second full refresh.
7 . The apparatus of claim 1 , wherein each of the plurality of entries in the cache ring has a respective entry type comprising one of: an update entry type, a delete entry type, a create entry type, or a refresh entry type.
8 . A computer-implemented method, comprising:
generating a cache ring for a resource type, wherein the cache ring comprises a plurality of entries corresponding to objects associated with resources of the resource type in a cloud infrastructure, wherein the plurality of entries corresponds to a plurality of version numbers, and wherein the plurality of entries comprises a first set of entries corresponding to a first full refresh having a first start index and a first end index of the cache ring;
receiving, from a user interface, a subscription request that either lacks a version number or provides the version number that is not included in the plurality of version numbers; and
in response to the subscription request, when a current index of the cache ring satisfies a partial refresh condition, fails to meet a full refresh condition, or both, performing a partial refresh based on the first full refresh.
9 . The computer-implemented method of claim 8 , wherein the first full refresh is the only full refresh performed between the first start index and the current index.
10 . The computer-implemented method of claim 8 , wherein the partial refresh uses at least one entry of the first set of entries.
11 . The computer-implemented method of claim 8 , comprising:
in response to the subscription request, when the current index of the cache ring fails to meet the partial refresh condition, satisfies the full refresh condition, or both, performing a second full refresh having a second start index and a second end index of the cache ring.
12 . The computer-implemented method of claim 8 , wherein the partial refresh condition comprises a comparison between a first number of entries between the current index and the first end index and a second number of entries between the first end index and the first start index.
13 . The computer-implemented method of claim 12 , comprising:
in response to the subscription request, when the current index of the cache ring fails to meet the partial refresh condition, performing a second full refresh.
14 . The computer-implemented method of claim 8 , wherein each of the plurality of entries in the cache ring has a respective entry type comprising one of an update entry type, a delete entry type, a create entry type, or a refresh entry type.
15 . A tangible, non-transitory, and machine-readable medium comprising instructions that, when executed by processing circuitry, cause the processing circuitry to perform operations comprising:
generating a cache ring for a resource type, wherein the cache ring comprises a plurality of entries corresponding to objects associated with resources of the resource type in a cloud infrastructure, wherein the plurality of entries corresponds to a plurality of version numbers, and wherein the plurality of entries comprises a first set of entries corresponding to a first full refresh having a first start index and a first end index of the cache ring;
receiving, from a user interface, a subscription request that either lacks a version number or provides the version number that is not included in the plurality of version numbers; and
in response to the subscription request, when a current index of the cache ring satisfies a partial refresh condition, fails to meet a full refresh condition, or both, performing a partial refresh based on the first full refresh.
16 . The tangible, non-transitory, and machine-readable medium of claim 15 , wherein the partial refresh uses at least one entry of the first set of entries.
17 . The tangible, non-transitory, and machine-readable medium of claim 15 , wherein the operations comprise:
in response to the subscription request, when the current index of the cache ring fails to meet the partial refresh condition, satisfies the full refresh condition, or both, performing a second full refresh having a second start index and a second end index of the cache ring.
18 . The tangible, non-transitory, and machine-readable medium of claim 15 , wherein the partial refresh condition comprises a comparison between a first number of entries between the current index and the first end index and a second number of entries between the first end index and the first start index.
19 . The tangible, non-transitory, and machine-readable medium of claim 18 , wherein the operations comprise:
in response to the subscription request, when the current index of the cache ring fails to meet the partial refresh condition, perform a second full refresh.
20 . The tangible, non-transitory, and machine-readable medium of claim 15 , wherein each of the plurality of entries in the cache ring has a respective entry type of one of an update entry type, a delete entry type, a create entry type, and a refresh entry type.