Support For User Defined Functions In A Data Stream Management System
First Claim
1. A method implemented in a computer of processing a plurality of streams of data, the method comprising:
- processing the plurality of streams, to execute thereon a plurality of continuous queries based on a global plan;
during said processing, receiving a command to create a function and identification of a set of instructions to be executed to perform said function;
during said processing, creating in a memory of said computer, an instance of said set of instructions and a first structure comprising a reference to said instance;
during said processing, receiving a new continuous query to be executed using said function;
during said processing, based on said first structure, creating in said memory an operator to invoke the instance, the operator comprising a second structure, the second structure comprising a first field to hold said reference to said instance, and at least one additional field corresponding to at least one argument of said function;
during said processing, modifying the global plan by adding thereto said operator, thereby to obtain a modified plan;
altering said processing, to cause execution of the new continuous query in addition to said plurality of continuous queries, based on the modified plan, thereby to perform said function; and
outputting from said computer, a stream generated based at least partially on processing of said data by executing the new continuous query.
1 Assignment
0 Petitions
Accused Products
Abstract
A data stream management system (DSMS) is designed to support a new user-defined function, by creating and using at least two structures as follows. A first structure (“metadata entry”) is created in response to a command for creation of the new function, and maps a single instance of a class to the function'"'"'s name. A second structure is created with creation of an operator on receipt of each new continuous query that uses the new function. The second structure (“operator specific data structure”) contains a path to the newly-created instance, which path is obtained by looking up the first structure. Additional second structures are created on receipt of additional continuous queries which use the new function, but all second structures contain the same path. All continuous queries use the same instance. Repeated use of a single instance to compile and execute multiple queries eliminates repeated instantiation of the same function.
156 Citations
10 Claims
-
1. A method implemented in a computer of processing a plurality of streams of data, the method comprising:
-
processing the plurality of streams, to execute thereon a plurality of continuous queries based on a global plan; during said processing, receiving a command to create a function and identification of a set of instructions to be executed to perform said function; during said processing, creating in a memory of said computer, an instance of said set of instructions and a first structure comprising a reference to said instance; during said processing, receiving a new continuous query to be executed using said function; during said processing, based on said first structure, creating in said memory an operator to invoke the instance, the operator comprising a second structure, the second structure comprising a first field to hold said reference to said instance, and at least one additional field corresponding to at least one argument of said function; during said processing, modifying the global plan by adding thereto said operator, thereby to obtain a modified plan; altering said processing, to cause execution of the new continuous query in addition to said plurality of continuous queries, based on the modified plan, thereby to perform said function; and outputting from said computer, a stream generated based at least partially on processing of said data by executing the new continuous query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A data stream management system that processes streams of data using a plurality of continuous queries, the data stream management system comprising:
-
a store encoded with a plurality of tuples representing a relation, each tuple being time stamped; a memory encoded with a query plan currently being used in execution of the continuous queries; means, coupled to said store, for modifying the global plan in said memory in response receipt of a new continuous query that defines a new function defined by a user, if the global plan comprises an instance of the new function, by using a second operator to invoke the instance of the new function to implement the new continuous query; and means, coupled to said means for modifying and to said store, for executing an instruction in the second operator, to perform the new function.
-
Specification