Managing continuous queries with archived relations
First Claim
Patent Images
1. A system, comprising:
- a memory storing a plurality of instructions; and
one or more processors configured to access the memory, wherein the one or more processors are further configured to execute the plurality of instructions to at least;
identify a window for referencing at least a portion of a data stream, the data stream comprising one or more notifications of changes to at least a first data object;
provide a user interface to a user for configuring a configurable window size of the window;
receive, at the user interface, a value for the configurable window size of the window;
configure the configurable window size based at least in part on the value;
identify a continuous query that is to be based at least in part on an archived relation, the archived relation comprising at least a portion of historical data and incoming events of the data stream that are within the window that corresponds to the configurable window size, the historical data from a previous time associated with the data stream, the archived relation configured as a time-bounded window on the data stream that corresponds to the configurable window size, and the archived relation being not empty upon creation;
generate a query operator graph based at least in part on operators of the continuous query;
sort the query operator graph topologically, the topological sort performed such that the operators are ordered from a source operator to an output operator;
traverse the query operator graph in a topological order based at least in part on the topological sort of the query operator graph;
determine which operator of the query operator graph is a lowest stateful operator in the query operator graph based at least in part on the topological traversal;
execute an archiver query based at least in part on the sorted query operator graph to initialize the continuous query, the execution of the archiver query comprising;
receiving historical data, via a structured query language query, corresponding to the lowest stateful operator of the sorted query operator graph, the historical data comprising a backing store of the first data object; and
initializing the continuous query with the historical data corresponding to the lowest stateful operator of the sorted query operator graph and based at least in part on the configurable window size;
evaluate the archived relation using the continuous query by processing incoming events of the data stream and the at least a portion of the historical data associated with stateful operators of the query operator graph; and
listen to a messenger service for a notification of a subsequent change in the first data object compared with the initialized query and/or the portion of historical data.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for managing continuous queries with archived relations are provided. In some examples, a query that includes at least a data stream may be identified. Additionally, the query may be initialized with at least a portion of historical data. Further, in some instances, the query may be evaluated based at least in part on the data stream and the portion of the historical data.
556 Citations
19 Claims
-
1. A system, comprising:
-
a memory storing a plurality of instructions; and one or more processors configured to access the memory, wherein the one or more processors are further configured to execute the plurality of instructions to at least; identify a window for referencing at least a portion of a data stream, the data stream comprising one or more notifications of changes to at least a first data object; provide a user interface to a user for configuring a configurable window size of the window; receive, at the user interface, a value for the configurable window size of the window; configure the configurable window size based at least in part on the value; identify a continuous query that is to be based at least in part on an archived relation, the archived relation comprising at least a portion of historical data and incoming events of the data stream that are within the window that corresponds to the configurable window size, the historical data from a previous time associated with the data stream, the archived relation configured as a time-bounded window on the data stream that corresponds to the configurable window size, and the archived relation being not empty upon creation; generate a query operator graph based at least in part on operators of the continuous query; sort the query operator graph topologically, the topological sort performed such that the operators are ordered from a source operator to an output operator; traverse the query operator graph in a topological order based at least in part on the topological sort of the query operator graph; determine which operator of the query operator graph is a lowest stateful operator in the query operator graph based at least in part on the topological traversal; execute an archiver query based at least in part on the sorted query operator graph to initialize the continuous query, the execution of the archiver query comprising; receiving historical data, via a structured query language query, corresponding to the lowest stateful operator of the sorted query operator graph, the historical data comprising a backing store of the first data object; and initializing the continuous query with the historical data corresponding to the lowest stateful operator of the sorted query operator graph and based at least in part on the configurable window size; evaluate the archived relation using the continuous query by processing incoming events of the data stream and the at least a portion of the historical data associated with stateful operators of the query operator graph; and listen to a messenger service for a notification of a subsequent change in the first data object compared with the initialized query and/or the portion of historical data. - View Dependent Claims (2, 3, 4, 5, 6, 13, 14, 15, 16, 17, 18, 19)
-
-
7. A computer-readable memory storing a plurality of instructions executable by one or more processors, the plurality of instructions comprising:
-
instructions that cause the one or more processors to identify a window for referencing at least a portion of a data stream, the data stream comprising one or more notifications of changes to at least a first data object; instructions that cause the one or more processors to provide a user interface to a user for configuring a configurable window size of the window; instructions that cause the one or more processors to receive, at the user interface, a value for the configurable window size of the window; instructions that cause the one or more processors to configure the configurable window size based at least in part on the value; instructions that cause the one or more processors to receive a continuous query that is to be based at least in part on an archived relation, the archived relation comprising at least one of an identifier of the data stream that are within the window that corresponds to the configurable window size or an identifier of historical data, the historical data from a previous time associated with the data stream, the archived relation configured as a time-bounded window on the data stream that corresponds to the configurable window size, and the archived relation being not empty upon creation; instructions that cause the one or more processors to generate a query graph based at least in part on operators of the continuous query; instructions that cause the one or more processors to sort the query graph topologically, the topological sort performed such that the operators are ordered from a source operator to an output operator; instructions that cause the one or more processors to traverse the query operator graph in a topological order based at least in part on the topological sort of the query operator graph; instructions that cause the one or more processors to determine which operator of the query operator graph is a lowest stateful operator in the query operator graph based at least in part on the topological traversal; instructions that cause the one or more processors to execute an archiver query based at least in part on the sorted query graph to initialize the continuous query, the execution of the archiver query comprising; receiving historical data, via a structured query language query, corresponding to the lowest stateful operator of the sorted query graph, the historical data comprising a backing store of the first data object; and initializing the continuous query with the historical data corresponding to the lowest stateful operator of the sorted query graph and based at least in part on the configurable window size; instructions that cause the one or more processors to evaluate the archived relation using the continuous query by processing incoming events of the data stream and based at least in part on the portion of the historical data associated with stateful operators of the query graph; and instructions that cause the one or more processors to listen to a messenger service for a notification of a subsequent change in the first data object compared with the initialized query and/or the portion of historical data. - View Dependent Claims (8, 9)
-
-
10. A computer-implemented method, comprising:
-
identifying a window for referencing at least a portion of a data stream, the data stream comprising one or more notifications of changes to at least a first data object; providing a user interface to a user for configuring a configurable window size of the window; receiving, at the user interface, a value for the configurable window size of the window; configuring the configurable window size based at least in part on the value; receiving a continuous query that is to be based at least in part on an archived relation, the archived relation comprising at least a portion of historical data and incoming events of the data stream that are within the window that corresponds to the configurable window size, the historical data from a previous time associated with the data stream, the archived relation configured as a time-bounded window on the data stream that corresponds to the configurable window size, and the archived relation being not empty upon creation; generating a query graph based at least in part on operators of the continuous query, the query graph including at least a node representing an operator of the continuous query; sorting the query graph topologically, the topological sort performed such that the operators are ordered from a source operator to an output operator; traversing the query operator graph in a topological order based at least in part on the topological sort of the query graph; determining which operator of the query operator graph is a lowest stateful operator in the query operator graph based at least in part on the topological traversal; executing an archiver query based at least in part on the sorted query graph to initialize the continuous query, the execution of the archiver query comprising; receiving historical data, via a structured query language query, corresponding to the lowest stateful operator of the sorted query graph, the historical data comprising a backing store of the first data object; and initializing the continuous query with the historical data corresponding to the lowest stateful operator of the sorted query graph and based at least in part on the configurable window size; evaluating the archived relation using the continuous query by processing incoming events of the data stream and based at least in part on the portion of the historical data associated with stateful operators of the query operator graph; listening to a messenger service for a notification of a subsequent change in the first data object compared with the initialized query and/or the portion of historical data; and providing results of the evaluated archived relation for presentation in a user interface of a user device. - View Dependent Claims (12)
-
-
11. The computer-implemented method of 10, further comprising determining an optimal amount of the historical data with which to initialize the state of the stateful operators based at least in part on a first stateful operator of the sorted query operator graph.
Specification