Programming: A Shortfall of Legacy Event Processing

Katherine Rincon
July 18, 2016 · 2 minute read

Guest post on event processing by Opher Etzion

With the onset of the Internet of Things, our universe is now flooded with events that require event processing. These events are introduced to the digital world with all the wonders of IoT and wearable computing that report on anything and everything that happens. But our ability to take advantage of the power of these events is currently quite limited due to several barriers. Here, we’ll discuss one of the main barriers: the difficulty of event processing programming.

What Is Event Processing?

It’s important first to understand what event processing is and how it’s relevant to the challenge we have. Let’s take an example: Say we would like to build a system that detects that a car is being stolen. We can use a motion sensor, camera and velocimeter inside the car, as well as location sensors in the cell phones of all authorized drivers.

Next, we need to decide what pattern of reported events indicates car theft. In this case, the answer could be:

  1. A person enters the car (reported by the camera and motion sensors).
  2. The person does not look similar to any of the authorized drivers (using their archived pictures).
  3. None of the authorized drivers are currently at the car’s location.
  4. The car starts moving (reported by the velocimeter).

There are various types of patterns, including logical patterns of events (conjunction, disjunction, absence of events); temporal patterns (sequence, finding trends in events); looking for thresholds on a series of events; and more.

Indeed, much of the programming in events involves the filtering, transformation, aggregation, and pattern detection of events in real time. We are typically not interested in a single event, but in the interpretation of a pattern detected – in this case, the car is being stolen.

Programming Challenges

Now, let’s look at the programming aspects of working with events.

The way that most programmers have approached event processing is by inserting all events into a database, and then executing ad-hoc or periodic queries to detect patterns. This is consistent with the “request-response” paradigm of thinking in most programming.

However, this approach is neither effective nor efficient. We may miss detections if we conduct periodic queries, so most queries will be issued in vain. Besides, event thinking is different. The required abstractions are related to time and space, and are not present in current programming languages.

Another challenge in programming event processing applications is that it’s hard to get data in and out of these systems, and the syntax is often hard to learn. 

Furthermore, in many cases, the logic of the system must be personalized. Consider a collection of sensors installed in a home with elderly residents in order to provide alerts and reminders. In this case, such alerts are highly personalized, since different people have different needs. The inability to easily control event processing logic is a major challenge in making the power of events more accessible and more pervasive.

Like the Internet that succeeded when browsing the web became possible for everybody, the Internet of Things will bloom when everybody can control an application’s logic by creating and modifying patterns based on multiple events.

See how streaming data integration can work for you.

Schedule a Demo Download