# US 2022/0292032 A1 · Microservice system with global context cache

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292032 A1
- Document ID: US20220292032A1
- Status: Published application
- Kind: A1
- Application number: 17/198,458
- Filed: 2021-03-11
- Published: 2022-09-15
- Earliest claimed: 2021-03-11
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Hariharan Krishna; Shajeer K Mohammed; Sudheesh S. Kairali
- Web page: https://patentgrep.com/patent/US20220292032A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 12/128: adapted to multidimensional cache systems, e.g. set-associative, multicache, multiset or multilevel
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 8/60: Software deployment
- G06F 12/0866: for peripheral storage systems, e.g. disk cache
- G06F 2009/45562: {Creating, deleting, cloning virtual machine instances}
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2212/1016: Performance improvement
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- G06F 2212/154: Networked environment
- G06F 2212/163: Server or database system
- G06F 2212/466: Metadata, control data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed embodiments provide features for the architecture of microservices. A global context cache is created for a microservice environment that is accessible from multiple deployed microservices. Data from various customers/applications can be aggregated to establish a determination of when a read or write access would fail due to permissions, and/or other condition such as existence or non-existence of certain data. In such situations, an error can be returned from the global context cache in much less time than if the access request propagated throughout the computer network to the persistent storage. In this way, disclosed embodiments reduce downtime and save money for organizations, and increase the efficiency of utilization of computer resources

## Claims

### Claim 1

A computer-implemented method comprising:
building a global context cache for a plurality of microservice applications, wherein the global context cache includes a read cache, a write cache, and a discard cache;
receiving an access request from a microservice from the plurality of microservice applications;
determining if the received access request will fail based on cache data in the global context cache; and
in response to determining that the received access request will fail, returning an error to the microservice from the global context cache.

### Claim 2 (depends on 1)

The method of claim 1, further comprising, in response to not determining that the access request will fail, processing the received access request.

### Claim 3 (depends on 1)

The method of claim 1, wherein building the global context cache further includes building a delete cache.

### Claim 4 (depends on 1)

The method of claim 1, wherein the discard cache includes metadata for one or more previous access requests that were discarded due to an access failure.

### Claim 5 (depends on 3)

The method of claim 3, further comprising establishing a hit rate parameter for the read cache, write cache, discard cache, and delete cache.

### Claim 6 (depends on 3)

The method of claim 3, further comprising establishing a flush time parameter for the read cache, write cache, discard cache, and delete cache.

### Claim 7 (depends on 1)

The method of claim 1, further comprising creating a cache log for the global context cache, wherein the cache log contains a timestamped entry for cache data added to the global context cache.

### Claim 8 (depends on 1)

The method of claim 1, further comprising creating a cache log for the global context cache, wherein the cache log contains a timestamped entry for cache data deleted from the global context cache.

### Claim 9

An electronic computation device comprising:
a processor;
a memory coupled to the processor, the memory containing instructions, that when executed by the processor, cause the electronic computation device to: build a global context cache for a plurality of microservice applications, wherein the global context cache includes a read cache, a write cache, and a discard cache;
receive an access request from a microservice from the plurality of microservice applications;
determine if the received access request will fail based on cache data in the global context cache; and
in response to determining that the received access request will fail, return an error to the microservice from the global context cache.

### Claim 10 (depends on 9)

The electronic computation device of claim 9, wherein the memory further comprises instructions, that when executed by the processor, cause the electronic computation device to:
in response to not determining that the access request will fail, process the received access request.

### Claim 11 (depends on 9)

The electronic computation device of claim 9, wherein the memory further comprises instructions, that when executed by the processor, cause the electronic computation device to:
build a delete cache in the global context cache.

### Claim 12 (depends on 9)

The electronic computation device of claim 9, wherein the memory further comprises instructions, that when executed by the processor, cause the electronic computation device to:
establish a hit rate parameter for the read cache, write cache, discard cache, and delete cache.

### Claim 13 (depends on 9)

The electronic computation device of claim 9, wherein the memory further comprises instructions, that when executed by the processor, cause the electronic computation device to:
establish a flush time parameter for the read cache, write cache, discard cache, and delete cache.

### Claim 14 (depends on 9)

The electronic computation device of claim 9, wherein the memory further comprises instructions, that when executed by the processor, cause the electronic computation device to:
create a cache log for the global context cache, wherein the cache log contains a timestamped entry for cache data added to the global context cache.

### Claim 15 (depends on 9)

The electronic computation device of claim 9, wherein the memory further comprises instructions, that when executed by the processor, cause the electronic computation device to:
create a cache log for the global context cache, wherein the cache log contains a timestamped entry for cache data deleted from the global context cache.

### Claim 16

A computer program product for an electronic computation device comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the electronic computation device to:
build a global context cache for a plurality of microservice applications, wherein the global context cache includes a read cache, a write cache, and a discard cache;
receive an access request from a microservice from the plurality of microservice applications;
determine if the received access request will fail based on cache data in the global context cache; and
in response to determining that the received access request will fail, return an error to the microservice from the global context cache.

### Claim 17 (depends on 16)

The computer program product of claim 16, further including program instructions, that when executed by the processor, cause the electronic computation device to:
in response to not determining that the access request will fail, process the received access request.

### Claim 18 (depends on 16)

The computer program product of claim 16, further including program instructions, that when executed by the processor, cause the electronic computation device to:
build a delete cache in the global context cache.

### Claim 19 (depends on 16)

The computer program product of claim 16, further including program instructions, that when executed by the processor, cause the electronic computation device to:
establish a hit rate parameter for the read cache, write cache, discard cache, and delete cache.

### Claim 20 (depends on 16)

The computer program product of claim 16, further including program instructions, that when executed by the processor, cause the electronic computation device to:
establish a flush time parameter for the read cache, write cache, discard cache, and delete cache.
