0

I have build an analytic app for a company that shows Key Performance Indicators(KPIs) based on selling/buying of items of their employees.
Now what they want is to add event functionality like:
* alert them if any employee sell more than $10,000 worth items
* or alert them if some employee is tired of life and killed himself/herself
basically these silly events.

I am totally blank about what to do, they recommended using ESPER but I find it very tough to understand how event processing works.
I want to know how Event Processing works in such cases and where can i learn more about it.
See besides programming and DB i know nothing and I am not a PRO too.
Please share your opinions on what am I supposed to do?

Sachin Verma
  • 3,712
  • 10
  • 41
  • 74

2 Answers2

0

Basically, complex event processing is used when you need to analyze "streams" of data, and when you have to react quickly when a seeked pattern emerges from it. For example when three guys flying from different airports are carrying ingredients to potentially build a bomb, and they're heading to the same destination, you need to find that correlation in data flowing from each of the airports, and react to the event quickly.

Employee selling more than 10000 is not something you need to know about in real-time. You can reward him next month, and for that "normal" reporting will work just fine.

Some papers to read: Oracle CEP

AdamL
  • 12,421
  • 5
  • 50
  • 74
0

CEP is an excellent way to accomplish your task actually. You can think of CEP as a pattern matching technique. Once it's matched you can be notified or launch another process if your CEP is integrated with other tools.

Here's the example from Wikipedia. We can easily infer that it's a wedding based on these incoming signals:

  • church bells ringing.
  • the appearance of a man in a tuxedo with a woman in a flowing white gown.
  • rice flying through the air.

This is an abstract example, and things like this probably aren't getting put into any system, but you get the idea. It's best to see the code to understand a CEP implimentation. Here's exactly the script you can write on top of NebriOS to build the inference. Other tools like Drools will accomplish the same thing.

class wedding_detect(NebriOS):
    def check(self):
        if self.church_bells == "ringing" and \
            (self.clothes_type == "tuxedo" or \
            self.clothes_type == "wedding gown") and \
            self.rice_flying == True:
            return True
        else
            return False

    def action(self):
        # fires if the check() is true
        send_email("me@example.com", "A wedding is underway")

For your situation, CEP is easy to program also:

class sales_alert(NebriOS):
    def check(self):
        return self.sales_total > 10000

    def action(self):
        send_email("me@example.com", "You got a $10k sale!")

The sales_total can come into the system from your CRM for example.

That's CEP - Complex Event Processing! A start anyways.

Adam
  • 3,311
  • 1
  • 18
  • 9