System and Method for Caching Time Series Data
AssigneeInMobi PTE Ltd.
InventorArvind Jayaprakash
Life of this patent
Estimating the term…
Abstract
The present invention provides a method and system for caching time series data. A computer system for caching time series data is disclosed. The computer system comprises one or more processors, at least one cache, and a computer readable storage medium. The computer readable storage medium contains instructions that, when executed by the one or more processors, causes the one or more processors to perform a set of steps comprising fetching the time series data from a time series data source, calculating one or more expiry timestamps, grouping the plurality of time series datum in to one or more time data chunks based on the one or more expiry timestamps, and storing a copy of the time series data and the one or more expiry timestamps in the at least one cache.
Claims20
A computer system for caching time series data, the computer system comprising:
- one or more processors;
- at least one cache;
- and
- a non-transitory computer readable storage medium,
- wherein the non-transitory computer readable storage medium includes instructions that, when executed by the one or more processors, cause the one or more processors to perform a set of steps comprising:
- receiving a request for the time series data;
- fetching the time series data from a time series data source, wherein the time series data comprises a plurality of time series datum and a fetch timestamp;
- calculating one or more expiry timestamps, wherein each expiry timestamp from the one or more expiry timestamps is calculated using a composite function of the fetch timestamp of the time series data and a recording time associated with a time series datum, such that the expiry timestamp is inversely proportional to the recording time associated with the time series datum so that newer time series data expires on or before older time series data, and the expiry time stamp is directly proportional to the fetch timestamp of the time series data;
- grouping the plurality of time series datum in to one or more time data chunks based on the one or more expiry timestamps, wherein each time data chunk from the one or more time data chunks comprises a distinct set of time series datum from the time series data;
- determining the validity of the one or more time data chunks of the time series data based on the one or more expiry timestamps;
- storing a copy of the time series data and the one or more expiry timestamps in the at least one cache;
- serving the requests from one of a group consisting of the time series data source and the at least one cache, based on the validity of the one or more time data chunks of the time series data;
- and
- utilizing the one or more expiry timestamps to respond to requests for the time series data.
A computer implemented method for caching time series data, the computer implemented method comprising:
- receiving a request for the time series data;
- fetching, by one or more processors, the time series data from a time series data source, wherein the time series data comprises a plurality of time series datum and a fetch timestamp;
- calculating, by the one or more processors, one or more expiry timestamps, wherein each expiry timestamp from the one or more expiry timestamps is calculated using a composite function of the fetch timestamp of the time series data and a recording time associated with a time series datum, such that the expiry timestamp is inversely proportional to the recording time associated with the time series datum so that newer time series data expires on or before older time series data, and the expiry time stamp is directly proportional to the fetch timestamp of the time series data;
- grouping, by the one or more processors, the plurality of time series datum in to one or more time data chunks based on the one or more expiry timestamps, wherein each time data chunk from the one or more time data chunks comprises a distinct set of time series datum from the time series data;
- determining, by the one or more processors, the validity of the one or more time data chunks of the time series data based on the one or more expiry timestamps;
- storing, by the one or more processors, a copy of the time series data and the one or more expiry timestamps in at least one cache;
- serving, by the one or more processors, the requests from one of a group consisting of the time series data source and the at least one cache, based on the validity of the one or more time data chunks of the time series data;
- and
- utilizing the one or more expiry timestamps to respond to requests for the time series data.
A computer implemented method for serving time series data, the computer implemented method comprising:
- receiving, by one or more processors, a request for the time series data;
- calculating, by the one or more processors, one or more expiry timestamps, wherein each expiry timestamp from the one or more expiry timestamps is calculated using a composite function of current time and a recording time associated with a time series datum, such that the expiry timestamp is inversely proportional to the recording time associated with the time series datum so that newer time series data expires on or before older time series data, and the expiry time stamp is directly proportional to the current time
- decomposing, by the one or more processors, the request into one or more sub requests based on the one or more expiry timestamps;
- and
- determining, by the one or more processors, the validity of the one or more time data chunks of the time series data based on the one or more expiry timestamps;
- and
- serving, by the one or more processors, the one or more sub requests from one of a group consisting of the time series data source and the at least one cache, based on the one or more expiry timestamps.
A non-transitory, computer program product comprising instructions stored therein that, when executed by the one or more processors, cause the one or more processors to perform a set of steps comprising:
- receiving a request for the time series data;
- fetching the time series data from a time series data source, wherein the time series data comprises a plurality of time series datum and a fetch timestamp;
- calculating one or more expiry timestamps, wherein each expiry timestamp from the one or more expiry timestamps is calculated using a composite function of the fetch timestamp of the time series data and a recording time associated with a time series datum, such that the expiry timestamp is inversely proportional to the recording time associated with the time series datum so that newer time series data expires on or before older time series data, and the expiry time stamp is directly proportional to the fetch timestamp of the time series data;
- grouping the plurality of time series datum in to one or more time data chunks based on the one or more expiry timestamps, wherein each time data chunk from the one or more time data chunks comprises a distinct set of time series datum from the time series data;
- determining the validity of the one or more time data chunks of the time series data based on the one or more expiry timestamps;
- storing a copy of the time series data and the one or more expiry timestamps in the at least one cache;
- serving the requests from one of a group consisting of the time series data source and the at least one cache, based on the validity of the one or more time data chunks of the time series data;
- and
- utilizing the one or more expiry timestamps to respond to requests for the time series data.
Dependencies are inferred from the claim text.