It's
been a while since I've put a few thoughts in print on these pages on
event processing, but that's not to say I've not been busy. We've
wrapped up quite a successful year in the Apama division
within Progress software. For this year, 2009 we've got quite a
number of new features and capabilities in store for the Apama CEP
platform. We will be extending the breadth and depth our event
processing language (EPL) to meet the challenges we've seen in
the market and a vision we have for the future. Of course you will see
announcements in our standard marketing press
releases but I (and others) will explore the technical merits of those new
features in these blog pages in much more detail. Something we've
not done that much of in the past. There are many historical
reasons for that not really worth explaining. Suffice to say our
intention is to be more transparent in the coming year.
To kick that off, it's worth starting a bit of a tutorial on the Apama EPL, a language we call MonitorScript. I'll begin with the basics here and in subsequent blogs build upon these main concepts, providing insight into the power and flexibility of our EPL. And as we release new extensions and capabilities it will be easier to explain the benefits of those new features. So without further ado, here is the first installment.
First a few basic concepts...
Second a few basic terms...
The language sports a number of capabilities that will be familiar to anyone schooled in java, C++ or any traditional imperative programming language. I won't bore with all the nuances of data types and such obvious basics, those are well articulated in our product documentation and customer training courses. I will however, focus on the unique paradigm of event processing.
Apama MonitorScript, a basic monitor.
event
StockTrade { string symbol; float price; integer quantity; } monitor StockTradeWatch { StockTrade Trade;
action onload {
action processTick { |
This monitor called StockTradeWatch defines an event of type StockTrade. Events can originate from many sources in the Apama platform, the most obvious would be an adapter connected to a source of streaming data (i.e. stock trades as example shows), but they can come from files, databases, other monitors, even monitors in other Correlators.
The onload action declares a listener for events of type StockTrade (i.e. on all StockTrade). When the monitor StockTradeWatch receives StockTrade events, the action processTick is invoked. As you can see in this example we simply log a message to indicate that it occurred. The obvious intent is that this monitor will receive a continuous stream of StockTrade events, each one will be processed in-turn by the processTick action. One can be more selective in the event pattern with a listener, such as on all StockTrade(symbol="IBM"). I will explore the details of event patterns and complex listeners later on.
As I mentioned, I've started with a simple example that shows the basics of the Apama EPL, MonitorScript. It demonstrates the simplicity by which one can declare interest in a particular event pattern, receive matching events and act on them in your application (i.e. action).
In subsequent installments I will demonstrate more complex features highlighting the power of the language. That's all for now.
You can find the second installment here.
Regards,
Louie
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites