Certain example embodiments described herein relate to stream processing. More particularly, certain example embodiments described herein relate to techniques for the attachment of priorities and/or reaction time limits to various entities of the system such as, for example, events, event types, queries, etc. The system's processing may be tailored behavior to match these boundary conditions while at the same time increasing (and sometimes even maximizing) the rate of events processed. Advantageously, the system may be made to adapt its behavior to the current situation, which is changeable and may even be changing quite frequently, e.g., as in connection with a potentially rapidly changing stream.
Stream processing typically follows the pattern of continuous queries. Continuous queries are queries that execute for an indefinite amount of time on data that can change very rapidly. Such rapidly changing data are called streams, and streams oftentimes comprise events. Streams exist in many real-world scenarios, e.g. temperature readings from sensors placed in warehouses or on trucks, weather data, entrance control systems (where, for example, events are generated whenever a person enters or leaves), etc. The meanings of these and/or other terms herein may be clarified by referring to the “Event Processing Glossary,” published by the “Event-Processing Technical Society” (EP-TS), the entire contents of which is hereby incorporated herein by reference.
One typical scenario where continuous queries sometimes are implemented involves the monitoring or surveillance of systems that sometimes are quite complex in nature. A multitude of streams may exist in such an example scenario. However, it will be appreciated that not all events are of equal importance in all such scenarios. For example, in a power plant, the temperature data of the cooling liquid tends to be less important than a security breach. Certain conditions may, however, shift these priorities. For example, very high temperature data, temperature data in the context of low amounts of cooling fluid, etc., may shift priorities.
In many systems, there is a risk that important data may be processed too late to guarantee a timely reaction. Such problems may be caused, for example, by the sheer amount of data arriving in the streams, a lack of resources for handling such data, etc. Although sometimes the delay will not be too problematic, it will be appreciated that there are many scenarios where the failure to timely process large amounts of data based on shifting priorities might become quite serious. For instance, a business enterprise may not be able to timely deliver needed goods and/or services. Of course, the failure to adjust to shifting priorities in the power plant scenario, for example, may be catastrophic.
There are several currently available systems for continuous query processing. TIBCO®, for example, describes what may be termed a “query system.” Other query systems are described, for example, in U.S. Publication Nos. 2009/0292877 and 2009/0292759, the entire contents of which are hereby incorporated by reference in their entireties. TIBCO®, for example, describes one example query system indicating that:
The TIBCO® example continues by stating that:
“In addition, rules may have names, priority numbers and other metadata. Rule priorities are to aid in ‘conflict resolution’, a fancy term for what happens when 2 or more rules are valid to fire: which do we want to fire first?”
In the TIBCO® example system, events are fully processed in any case, and there are no apparent means to process important events in a prioritized fashion. Thus, the above-described and other conventional query systems unfortunately do not provide flexible mechanisms that help ensure increased (and sometimes even maximum) data processing while also caring for timely processing of events at the same time.
Thus, it will be appreciated that there is a need in the art for techniques that overcome these and/or other disadvantages. For example, it will be appreciated that there is a need in the art for techniques that provide flexible mechanisms that help ensure increased (and sometimes even maximum) data processing while also caring for timely processing of events at the same time.
One aspect of certain example embodiments relates to the attachment of priorities and/or reaction time limits to various entities of the system such as, for example, events, event types, queries, etc.
Another aspect of certain example embodiments relates to using priorities attached to system entities to tailor the system's processing behavior to match these boundary conditions while at the same time increasing (and sometimes even maximizing) the rate of events processed.
Advantageously, the system may be made to adapt its behavior to the current situation, which is changeable and may even be changing quite frequently, e.g., as in connection with a potentially rapidly changing stream. Users may in certain example embodiments specify policies to control this adaptation in certain example embodiments and, thus, in certain example instances, events (including events of special interest) may be handled appropriately, even in response to changing conditions.
It will be appreciated that in some cases, the appropriate handling of events may involve the at least temporary suspension of some routine activities while events of interest (e.g., “business critical” or “mission critical” events) are processed according to their priorities.
In certain example embodiments, a method for handling a stream of events is provided. The stream of events is received, with at least some of said events having boundary conditions attached thereto, and with the boundary conditions being maximum reaction times and/or priorities. Predefined queries are executed, via at least one processor of a computer system, on the events. For each said event having a maximum reaction time and/or priority attached thereto: whether the event can be processed within the attached boundary condition is estimated, the predefined queries are processed according to a first mode when the event can be processed within the attached boundary condition, and the predefined queries are processed according to a second mode when the event cannot be processed within the attached boundary condition. The second mode is practiced by at least temporarily suspending queries that do no consume events with attached boundary condition instead processing other queries. The second mode is ended and processing proceeds according to the first mode when it is estimated that unconsumed events having attached boundary conditions can be processed within their attached boundary conditions.
In certain example embodiments, a method for configuring a system to handle a stream of events is provided. A plurality of event types is defined. Said event types are stored in an event type registry. The system is able to execute in first and second modes. The stream of events is received, with at least some of said events having boundary conditions attached thereto, and with the boundary conditions being maximum reaction times and/or priorities. Queries are executed, via at least one processor of the system, on the events. For each said event having a maximum reaction time and/or priority attached thereto: whether the event can be processed within the attached boundary condition is estimated, the queries are processed according to the first mode when the event can be processed within the attached boundary condition, and the queries are processed according to the second mode when the event cannot be processed within the attached boundary condition. The second mode is practiced by at least temporarily suspending queries that do no consume events with attached boundary condition instead processing other queries. The second mode is ended and processing is returned to the first mode when it is estimated that unconsumed events having attached boundary conditions can be processed within their attached boundary conditions.
In certain example embodiments, corresponding systems for providing, configuring, and/or executing the above may be provided in addition or in the alternative.
In certain example embodiments, corresponding computer readable storage media tangibly storing instructions for executing such methods also may be provided.
These aspects and example embodiments may be used separately and/or applied in various combinations to achieve yet further embodiments of this technology.
These and other features and advantages may be better and more completely understood by reference to the following detailed description of exemplary illustrative embodiments in conjunction with the drawings, of which:
Systems for processing of continuous queries on streams of events are often inherently sized for a certain maximum load. In cases where the load suddenly increases beyond expectations, for example, these systems may be overloaded, potentially resulting at least in increased response and reaction times. When these systems have a business-critical function, e.g., controlling a power plant status or financial trade control, there are certain situations where it is not acceptable if certain predefined reaction times are exceeded for certain severe events. Unfortunately, the same system may nonetheless perform certain routine activities where increased reaction time or even partial or complete suppression of such computations may not matter from micro- and/or macro-perspectives. As alluded to above, however, existing systems for continuous query processing on streams of events do not provide mechanisms that allow users to define “handling policies” for both events of interest routine events. Rather, it is believed that in conventional systems, users only define a sequence for the rules to be applied, and all rules nevertheless are applied for all incoming events.
Certain example embodiments address these and/or issues, e.g., by attaching priorities and/or reaction time limits to various entities of the system such as, for example, events, event types, queries, and/or the like. The systems of certain example embodiments may tailor their processing behaviors to match these boundary conditions while at the same time increasing (and sometimes even maximizing) the rate of events processed. Thus, the systems of certain example embodiments may adapt their behaviors to the current set of situations. The user may also specify policies to control this adaptation in certain example instances.
Referring now more particularly to the drawings in which like components have like reference numerals throughout the several views,
Event attributes 212 common to the
Referring again to
The example event bus and queuing system 106 shown in
Referring once again to
Continuous queries may be specified in various languages. Example languages include, for example, SQL dialects, XQuery extensions, proprietary languages, etc. A query may include some or all of the following and/or other parts:
The query evaluating program logic 110 may also monitor the reaction times. Reaction time is defined as the time between the arrival of an event at the event bus and queuing system 106 and its consumption by all queries that will eventually consume the event. This implies that an event may be consumed by multiple queries. In some normal operation modes (modes that are not interrupted because of concerns about the potential timeliness of processing), events are consumed in the sequence of their arrival. This may in certain example embodiments involve serial processing that may result in first-in-first-out (FIFO) type processing, and/or or parallel processing where FIFO type processing is not always guaranteed.
If the required reaction time can be met with the normal processing mode, the system behavior does not change (step S406). However, the event bus and queuing system 106 keeps monitoring the event (step S408). In the event that the evaluating program logic 110 estimates that reaction time requirements cannot be fulfilled (either by its initial estimation from step S404 or during later monitoring from step S410), the event bus and queuing system 106 may be made to switch from normal processing mode to real-time processing mode (step S410). In the real-time processing mode, queries that do not consume events with defined reaction times (labeled herein as irrelevant queries and discussed in greater detail below) are at least temporarily suspended (step S412), and processing continues in this real-time processing mode.
It will be appreciated that in the real-time processing mode, other events with defined reaction times may be received that would be consumed by the suspended queries. In this case, these queries may be resumed. Thus, for each new event with defined reaction times, the set of relevant queries may be determined. Furthermore, events that are not consumed by the remaining relevant queries (events not in set N as discussed in greater detail below) are held back in the event bus and queuing system 106. For the remaining queries and events, real-time scheduling techniques may be applied to help ensure that reaction times are met. It will be appreciated that approaches to finding an optimal or at least improved plan for the processing of continuous queries may be treated similarly to traditional database system query optimization and thus handled in accordance with the techniques described in U.S. Publication No. 2010/0030896, for example.
A rule may be specified to resolve conflicts in the event that event types and channels both define reaction times. For instance, a suitable rule might be that if event types and channels define both reaction times, the shorter time is to be used. An explicit reaction time setting for a single event may overwrite the channel or type specific reaction times, thereby also providing the capability to make an event “less urgent.”
Once the system estimates that the currently unconsumed events that have defined reaction times could be processed in normal processing mode without violating the reaction times, the system 100 may switch back to normal processing mode (step S414), resuming all queries and delivering all events. It will be appreciated that the suspended queries might consume events that have no defined reaction times but that were already processed by the non-suspended queries. In such a case, the event bus and queuing system 106 may maintain such events (e.g., in a suitable data store) until they are consumed by all queries.
Similar to the above, if event types and channels both define priorities, a rule may be defined to resolve any conflicts that might arise. For instance, the rule may specify that the higher priority is to be used. An explicit priority setting for a single event therefore may always overwrite channel or type specific priorities, effectively enabling the system to demote an event or make that event “less important.”
Once the system overload is resolved, the system switches back to normal processing mode (step S512), e.g., delivering all events in the sequence of their arrival. It is possible that in this processing mode, events are discarded and never delivered (e.g., when certain system resource limits are reached).
It will be appreciated that the same event may have priority and reaction times assigned in certain example instances. In such cases, both may be handled independently, e.g., in connection with the techniques described above.
The processing model as described above implies that it is possible to identify queries that consume certain events, e.g., events from the event set E that is defined by all events that have a reaction time defined or by the events with the highest priority, as described above. Furthermore, the set of all events consumed by such queries may be determined. The separation of all queries in the system into those that will consume a certain set of events (relevant queries) and those that do not (irrelevant queries), is referred to herein as query partitioning.
The set S of events implies a set T of event types: TS={t|eεS and t is type of e}.
A query Q specifies the event type(s) TQ it consumes. Thus, all queries Q for which TS∩TQ=Ø are irrelevant queries.
A query may also specify constraints C on the events of types in TQ. These can also be used to add queries to the set of irrelevant queries. For example, whenever there is no event in E that satisfies C, the query can be added to the irrelevant queries. Each query that is not a member of the set of irrelevant queries is a relevant query.
A relevant query might need more events as input than are in set E to ensure that the query semantics remains unchanged in certain example instances. The types of these events may be defined by TQ. All events of these types form the set of possibly needed events N. The query constraints may be used to reduce the set of possibly needed events in certain example instances.
It will be appreciated that the example query partitioning techniques described herein may be performed by any suitably configured arrangement of program logic. Such program logic may, for example, also be the query evaluating program logic, a component thereof, or different therefrom. Furthermore, the program logic configured to perform the example query partitioning techniques described herein may be operably connected to the event bus and queuing system 106 and the event type registry 102, e.g., to analyze incoming events and to assess dependencies, for example, in the manners described above.
Priorities and/or reaction times need not always be assigned as attributes to all possible events. The query language nevertheless may grant access to the priority and the defined reaction time for an event, and also may allow for setting priorities and defining reaction times for the events constituting the output result. For example, when a generated event is based on high-priority events, it may be desirable to assign a high priority to this generated event. Such assignments may be user-driven, automatic, or some combination thereof.
Channels and event types may be assigned a priority or reaction time (e.g., by the user of the system). However, a different technique may be employed for single events. As fast event processing may be assumed, user-specified priority or reaction time adjustment may not always be effective and/or accurate. The source of the events that sends them to the event bus and queuing system 106 may assign priority or reaction time in certain example embodiments. In certain example embodiments, in addition, or as an alternative, to user-specified and/or source specification, policies may be used as a powerful and adaptive mechanism in the event bus and queuing system 106. Policies may react on system states, on event attribute values, on existing priorities and reaction times, etc. A policy may comprise a condition and an action. A policy may apply to a single event or to a set of events, e.g., by setting and/or modifying their priority or reaction time, switching the processing mode, etc. Example policies may include, for example:
The system 100 may in certain example embodiments provide logging facilities to make policy-driven changes auditable. Such logging facilities (not shown in
In certain example embodiments, priorities may be assigned to queries. The system 100 may compute corresponding priorities for the events consumed by the queries. Prioritization also may use the knowledge from previous computations to improve and sometimes even optimize its behavior. For instance, a data store may be maintained and used to store information about previous computations that may be fed into the query evaluating program logic 110 for optimization calculations.
It will be appreciated that as used herein, the terms system, subsystem, service, programmed logic circuitry, and the like may be implemented as any suitable combination of software, hardware, firmware, and/or the like. It also will be appreciated that the storage locations herein may be any suitable combination of disk drive devices, memory locations, solid state drives, CD-ROMs, DVDs, tape backups, storage area network (SAN) systems, and/or any other appropriate tangible computer readable storage medium. It also will be appreciated that the techniques described herein may be accomplished by having a processor execute instructions that may be tangibly stored on a computer readable storage medium.
While the invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not to be limited to the disclosed embodiment, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
6092102 | Wagner | Jul 2000 | A |
6182120 | Beaulieu et al. | Jan 2001 | B1 |
6449618 | Blott et al. | Sep 2002 | B1 |
6658485 | Baber et al. | Dec 2003 | B1 |
7380248 | Isenberg et al. | May 2008 | B1 |
7493406 | Amini et al. | Feb 2009 | B2 |
7613848 | Amini et al. | Nov 2009 | B2 |
7751398 | Veprinsky et al. | Jul 2010 | B1 |
20020107864 | Battas et al. | Aug 2002 | A1 |
20020123989 | Kopelman et al. | Sep 2002 | A1 |
20020165903 | Zargham et al. | Nov 2002 | A1 |
20020174263 | Codd et al. | Nov 2002 | A1 |
20030005174 | Coffman et al. | Jan 2003 | A1 |
20030131063 | Breck | Jul 2003 | A1 |
20030131143 | Myers | Jul 2003 | A1 |
20030177183 | Cabrera et al. | Sep 2003 | A1 |
20040078724 | Keller et al. | Apr 2004 | A1 |
20040078802 | Hammer et al. | Apr 2004 | A1 |
20050010558 | Dettinger et al. | Jan 2005 | A1 |
20050192937 | Barsness et al. | Sep 2005 | A1 |
20050246301 | Lin et al. | Nov 2005 | A1 |
20060090165 | Martin et al. | Apr 2006 | A1 |
20060190430 | Luo et al. | Aug 2006 | A1 |
20070162421 | Pang et al. | Jul 2007 | A1 |
20070198397 | McGinley et al. | Aug 2007 | A1 |
20080072221 | Chkodrov et al. | Mar 2008 | A1 |
20080133891 | Salz et al. | Jun 2008 | A1 |
20080134158 | Salz et al. | Jun 2008 | A1 |
20080196006 | Bates et al. | Aug 2008 | A1 |
20080209078 | Bates et al. | Aug 2008 | A1 |
20080243463 | Lovas et al. | Oct 2008 | A1 |
20080262890 | Korupolu et al. | Oct 2008 | A1 |
20080301124 | Alves et al. | Dec 2008 | A1 |
20090006320 | Ding et al. | Jan 2009 | A1 |
20090064182 | Holar et al. | Mar 2009 | A1 |
20090070786 | Alves et al. | Mar 2009 | A1 |
20090112853 | Nishizawa et al. | Apr 2009 | A1 |
20090171999 | McColl et al. | Jul 2009 | A1 |
20090222397 | Proctor et al. | Sep 2009 | A1 |
20090249287 | Patrick | Oct 2009 | A1 |
20090292759 | Piper et al. | Nov 2009 | A1 |
20090292877 | Piper et al. | Nov 2009 | A1 |
20090313400 | Amini et al. | Dec 2009 | A1 |
20100030896 | Chandramouli et al. | Feb 2010 | A1 |
20100031232 | Glazier et al. | Feb 2010 | A1 |
20100082603 | Krompass et al. | Apr 2010 | A1 |
20100083145 | Schang et al. | Apr 2010 | A1 |
20100095299 | Gupta et al. | Apr 2010 | A1 |
20100153363 | Suzuki et al. | Jun 2010 | A1 |
20100251262 | Rokicki et al. | Sep 2010 | A1 |
Number | Date | Country |
---|---|---|
2008097912 | Aug 2008 | WO |
2009134945 | Nov 2009 | WO |
Entry |
---|
Luckham, et al., “Event Processing Glossary—Version 1.1,” Event Processing Technical Society, Jul. 2008. |
Vincent, Paul, “Complex Event Processing blog,” http://tibcoblogs.com/cep/2008/11/17/the-value-of-production-rules/, retrieved Nov. 3, 2010. |
Number | Date | Country | |
---|---|---|---|
20120110599 A1 | May 2012 | US |