Cloud Query Result Caching

Result caching of data from a source for a Cloud-based requester. The source could be on-premises or Cloud based.

Pattern Definition

ProblemHow do I cache a result from an on-premise source or another public cloudto make subsequent requests return results faster?
ContextThis pattern is applicable when the response requires considerable time or compute resources to create, for example a report. It is also applicable if the source for the response has limited throughput or is difficult to scale to support new initiatives e.g. mobile, multi-cloud. This pattern is also applicable if the response is a large data set.
The source could be on-premises or in another Cloud.
This pattern does not include on-premises caching.
Forces
  • Cloud-based requestor needs data from a source on-premises or in another Cloud.
  • On-premises source has difficulty supporting new Cloud-based solutions.
  • Reduces the affinity between Cloud and on-premises or between one Cloud and another Cloud.
SolutionThe result returned from a source is cached in the Cloud to service subsequent requests for the same data. This reduces the response times for the Cloud-based requestors and reduces the load on the source, whether on-premises or in another Cloud.
The data can be cached in memory or on disk.
ConsequencesPros:
  • Reduces latency and required bandwidth of data requests from sources on-premises or in another Cloud.
  • Reduces coupling between on-premises sources and Cloud-based requestors or between one Cloud and another Cloud.
  • Supports new Cloud-based functionality that leverages existing on-premises data sets.
Cons:
  • Only applicable when multiple requests within a short period of time are made for the same data.
  • Sub-optimal for requests from on-premises requestor for data from an on-premises source.

Interaction Views


Result Caching

A Requestor requires data from an on-premises and/or cloud source. The data may be large or time consuming to compute.

Interactions

Interaction initiated by the Cloud-based requestor:

  1. The requestor initiates the data request via the application integration platform.
  2. The application integration platform communicates with the data source. This can be on-premise or in the cloud or both.
  3. The application integration platform posts the result message to the Data Cache with a time-to-live value.
  4. Another request for the data is received.
  5. If the request is for the same data and within the time-to-live window, the application integration platform retrieves the data from the Data Cache. Otherwise, the application integration platform will fetch the data from the on-premises/cloud source.

Notes

  1. The application integration platform could also use the Data Cache component to cache results from multiple public Cloud sources.

Grid Result Caching

A Requestor requires data from an on-premises and/or cloud source. The data may be large or time consuming to compute.

Interactions

Interaction initiated by the Cloud-based requestor:

  1. The requestor initiates the data request via the application integration platform.
  2. The application integration platform gets the data from an on-premises source and/or cloud source.
  3. The application integration platform posts the result message to the caching platform with a time-to-live value.
  4. Another request for the data is received.
  5. If the request is for the same data and within the time-to-live window, the application integration platform retrieves the data from the caching platform. Otherwise, the application integration platform will need to fetch the data from the on-premises and/or cloud source.

Notes

  1. The application integration platform could also use the caching platform to cache results from multiple Clouds.

File Caching

A Requestor requires data from an on-premises and/or cloud source. The result is a large file. 

Interactions

Interaction initiated by the Cloud-based requestor:

  1. The Requestor initiates the data request via the application integration platform.
  2. The application integration platform gets the data from an on-premises and/or cloud source.
  3. The application integration platform posts the result message to the Object Storage with a time-to-live value. A URL to the file is returned to the original requestor.
  4. Another request for the data is received.
  5. If the request is for the same data and within the time-to-live window, the application integration platform returns the URL to the data from the Object Storage. Otherwise, the application integration platform will need to fetch the data from the on-premises and/or cloud source.

Notes

  1. The application integration platform could also use the Object Storage to cache results from multiple Cloud sources.