Variable duration windows on continuous data streams
First Claim
Patent Images
1. A method comprising:
- receiving, by a computing device, a query for an event stream, the event stream having an associated schema that each event received via the event stream conforms to, each event received via the event stream having one or more attributes associated with that event, the schema identifying how the one or more attributes for each event received via the event stream are organized, and the query specifying an expression indicating how an expiration duration is to be calculated for each event received via the event stream based on a first attribute of the one or more attributes associated with that event, the first attribute associated with each event identifiable based on the schema, the event stream generated by one or more event sources;
determining, by the computing device, a first expiration duration for a first event received via the event stream, the first expiration duration indicating a first amount of time that the first event is eligible to remain in a time-based window specified for the event stream, the first expiration duration determined based at least in part on the first attribute of the first event and the expression, the expression indicating how the first duration is to be calculated for the first event as specified in the query, the time-based window identifying a set of events of the event stream that are eligible to be queried by the query specified for the event stream;
determining, by the computing device, a second expiration duration for a second event received via the event stream, the second expiration duration indicating a second amount of time that the second event is eligible to remain in the time-based window, the second expiration duration determined based at least in part on the first attribute of the second event and the expression, the expression indicating how the second duration is to be calculated for the second event as specified in the query, wherein the second amount of time is different from the first amount of time;
removing, by the computing device, the first event from the time-based window after the first event has been in the time-based window for the first amount of time;
removing, by the computing device, the second event from the time-based window after the second event has been in the time-based window for the second amount of time;
repeatedly executing, by the computing device, the query against the set of events received via the event stream that are present within the time-based window when the query is executed; and
generating a set of one or more output events based on executing the query against the set of events.
1 Assignment
0 Petitions
Accused Products
Abstract
Improved techniques are provided for processing streams of data. The duration of the time that an event is eligible for remaining in a time-based window can be variable for different events received via the same event stream. In certain embodiments, the duration of time that an input event spends in a time-based window is a function of one or more values of one or more attributes of the event. Since different events can have different one or more attribute values, the different events can spend different amounts of time in the time-based window for that event stream. The amount of time that an event spends in a time-based window can be controlled via the one or more attributes of the event.
579 Citations
19 Claims
-
1. A method comprising:
-
receiving, by a computing device, a query for an event stream, the event stream having an associated schema that each event received via the event stream conforms to, each event received via the event stream having one or more attributes associated with that event, the schema identifying how the one or more attributes for each event received via the event stream are organized, and the query specifying an expression indicating how an expiration duration is to be calculated for each event received via the event stream based on a first attribute of the one or more attributes associated with that event, the first attribute associated with each event identifiable based on the schema, the event stream generated by one or more event sources; determining, by the computing device, a first expiration duration for a first event received via the event stream, the first expiration duration indicating a first amount of time that the first event is eligible to remain in a time-based window specified for the event stream, the first expiration duration determined based at least in part on the first attribute of the first event and the expression, the expression indicating how the first duration is to be calculated for the first event as specified in the query, the time-based window identifying a set of events of the event stream that are eligible to be queried by the query specified for the event stream; determining, by the computing device, a second expiration duration for a second event received via the event stream, the second expiration duration indicating a second amount of time that the second event is eligible to remain in the time-based window, the second expiration duration determined based at least in part on the first attribute of the second event and the expression, the expression indicating how the second duration is to be calculated for the second event as specified in the query, wherein the second amount of time is different from the first amount of time; removing, by the computing device, the first event from the time-based window after the first event has been in the time-based window for the first amount of time; removing, by the computing device, the second event from the time-based window after the second event has been in the time-based window for the second amount of time; repeatedly executing, by the computing device, the query against the set of events received via the event stream that are present within the time-based window when the query is executed; and generating a set of one or more output events based on executing the query against the set of events. - View Dependent Claims (2, 3, 4, 5, 6, 18, 19)
-
-
7. A computing device comprising:
-
a memory; and a set of processing units, wherein one or more processing units from the set of processing units are adapted to; receive a query for an event stream, the event stream having an associated schema that each event received via the event stream conforms to, each event received via the event stream having one or more attributes associated with that event, the schema identifying how the one or more attributes for each event received via the event stream are organized, and the query specifying an expression indicating how an expiration duration is to be calculated for each event received via the event stream based on a first attribute of the one or more attributes associated with that event, the first attribute associated with each event identifiable based on the schema, the event stream generated by one or more event sources; determine a first expiration duration for a first event received via the event stream, the first expiration duration indicating a first amount of time that the first event is eligible to remain in a time-based window specified for the event stream, the first expiration duration determined based at least in part on the first attribute of the first event and the expression, the expression indicating how the first duration is to be calculated for the first event as specified in the query, the time-based window identifying a set of events of the event stream that are eligible to be queried by the query specified for the event stream; determine a second expiration duration for a second event received via the event stream, the second expiration duration indicating a second amount of time that the second event is eligible to remain in the time-based window, the second expiration duration determined based at least in part on the first attribute of the second event and the expression, the expression indicating how the second duration is to be calculated for the second event as specified in the query, wherein the second amount of time is different from the first amount of time; remove the first event from the time-based window after the first event has been in the time-based window for the first amount of time; remove the second event from the time-based window after the second event has been in the time-based window for the second amount of time; repeatedly execute the query against the set of events received via the event stream that are present within the time-based window when the query is executed; and generate a set of one or more output events based on executing the query against the set of events. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer-readable memory storing a plurality of instructions executable by one or more processing units, the plurality of instructions comprising:
-
instructions that cause at least one processing unit from the one or more processing units to receive a query for an event stream, the event stream having an associated schema that each event received via the event stream conforms to, each event received via the event stream having one or more attributes associated with that event, the schema identifying how the one or more attributes for each event received via the event stream are organized, and the query specifying an expression indicating how an expiration duration is to be calculated for each event received via the event stream based on a first attribute of the one or more attributes associated with that event, the first attribute associated with each event identifiable based on the schema, the event stream generated by one or more event sources; instructions that cause at least one processing unit from the one or more processing units to determine a first expiration duration for a first event received via the event stream, the first expiration duration indicating a first amount of time that the first event is eligible to remain in a time-based window specified for the event stream, the first expiration duration determined based at least in part on the first attribute of the first event and the expression, the expression indicating how the first duration is to be calculated for the first event as specified in the query, the time-based window identifying a set of events of the event stream that are eligible to be queried by the query specified for the event stream; instructions that cause at least one processing unit from the one or more processing units to determine a second expiration duration for a second event received via the event stream, the second expiration duration indicating a second amount of time that the second event is eligible to remain in the time-based window, the second duration determined based at least in part on the first attribute of the second event and the expression, the expression indicating how the second duration is to be calculated for the second event as specified in the query, wherein the second amount of time is different from the first amount of time; instructions that cause at least one processing unit from the one or more processing units to remove the first event from the time-based window after the first event has been in the time-based window for the first amount of time; instructions that cause at least one processing unit from the one or more processing units to remove the second event from the time-based window after the second event has been in the time-based window for the second amount of time; instructions that cause at least one processing unit from the one or more processing units to repeatedly execute the query against the set of events received via the event stream that are present within the time-based window when the query is executed; and instructions that cause at least one processing unit from the one or more processing units to generate a set of one or more output events based on executing the query against the set of events. - View Dependent Claims (14, 15, 16, 17)
-
Specification