Experiencing "Oslo" Through Event Pattern Mesh
"Oslo" and Real-time Apps? Or maybe Complex Event Processing (CEP) in "Oslo"? Experiment through Event Pattern Mesh!
If you are unfamiliar with "Oslo", why not take a quick look here or learn more at ”Oslo” Developer Center. The first CTP version of “Oslo” was shipped at Microsoft Professional Developers Conference (PDC) 2008. The 5 “Oslo” video sessions from PDC are available from here (search for Oslo). I am actually very thrilled to hear that we made it into eWeek’s Top 10 Application Development Products for 2008, despite the fact that we have just released the first pre-beta CTP version last October.
Having recently completed a PhD in the event processing area, I could not wait to see how this concept could be implemented using the technologies within "Oslo". And that's basically the main motivation for Thomas Delrue and I to come up with our little application called 'Event Pattern Mesh’.
Event Pattern Mesh is an end-to-end application that has been designed for detecting patterns of occurrences from real-time data feeds. It also a good illustration of how the tools within "Oslo" can be used together in real-life scenarios. Event Pattern Mesh consists of
1. Model definitions. These include Event, Event Pattern and Event Pattern Mesh models defined using “MSchema”. Just to give you some idea, here is our Event model.

2. Event Pattern Modeling Language (EPML). This is a Domain Specific Language (DSL) that we have developed using MGrammar. The purpose of this language is to provide an intuitive way for a user create event patterns. For example, instead of creating each event pattern manually using “MSchema”, a user can simply use EPML to define an event pattern mesh as below.

3. Instance Generator: A tool which converts an event pattern mesh defined in EPML (described in 2.) into M instances.
Event Pattern Mesh makes use of the “M” Compiler to compile “M” instances into “M” images. From here, we can then use the MX tool to push the “M” images which contain event pattern mesh information into the “Oslo” Repository. Having event pattern details stored in the repository allows us to manage the information through a sleek design GUI in “Quadrant”.
One interesting design in Event Pattern Mesh is having the implementation of event and event pattern (binary files) as a part of the model as well as storing them in the repository. The nice thing about this is that now you can make use of the repository to label event pattern meshes and then assign each mesh, including its implementation, with different permissions. For example, if there are 2 traders trading stocks for 2 different clients, I am sure that they would not want to share event patterns that contain their trading strategies with each other. In this case, we store their event pattern mesh into different folders in the repository. Click here for a quick overview of the Event Pattern Mesh design.
So, after Event Pattern Mesh, what do I love about “Oslo”? Many things!
· MSchema: The concept of having a single data model works for me. I do not have to worry about having to define a model from the OO and ER perspectives. This means less development time as well as no overheads and errors from switching between these two concepts which is great!
· MGrammar: This concept goes well with MSchema because you can create several DSLs that are tied to a single model. For example, you can create different DSLs where each allows different types of user interaction to the model, depending on their technical skills, security levels or user groups.
· Repository: The row labelling mechanism in the Repository makes life much simpler when it comes to implementing and managing security. You can just assign different labels to different group of users. Another highlight of the Repository is security views which allow model modification (versioning) to be performed smoothly and without interruption.
· M Toolchain: This tool makes our life a lot simpler. It generates Repository-SQL from the MSchema models and also deploys them into/exports them from the Repository. The tool also provides the same options for a normal database.
On the downside, at this stage, some of the steps still have to be done manually. We used Intellipad to create our models (MSchema) and EPML (MGrammar). However, we had to deploy our models and generate M instances from EPML through the command line. Therefore, one thing would be nice to have is a tool that can take care all the steps from end to end? Perhaps Ipad will take care of these steps in the future release?
To learn more about Event Pattern Mesh, take a look at our video presentation or download the source code from here. If you are interested to find out more about the motivation behind this application, here are some references.
1. P. Mangkorntong and F. A. Rabhi, A Domain-Driven Approach for Detecting Event Patterns in E-Markets. World Wide Web: Internet and Web Information Systems. Springer Netherlands. ISSN 1386-145X (Print) 1573-1413 (Online), 13 December 2008.
2. P. Mangkorntong. A Domain-Driven Approach for Detecting Event Patterns in E-Markets: A Case Study in Financial Market Surveillance, PhD Thesis, School of Computer Science and Engineering, The University of New South Wales, April 2008.
3. P. Mangkorntong and F. A. Rabhi, A Domain-Driven Approach for Detecting Event Patterns in E-Markets: A Case Study in Financial Market Surveillance, In Proceedings of the 8th International Conference on Web Information Systems Engineering (WISE 2007), B. Benatallah et al. (Eds.), Lecture Notes in Computer Science, Springer-Verlag, Berlin Heidelberg. Vol. 4831 pp. 147-158, Nancy, France, 3-7 December 2007.
4. P. Mangkorntong and F. A. Rabhi, A High-Level Approach for Defining & Composing Event Patterns and Its Application to E-Markets. Proceedings of the Second International Workshop on Event-Driven Architecture, Processing and Systems (EDA-PS‘07) at the 33rd Very Large Data Bases (VLDB‘07), Vienna, Austria, 23 - 27 September 2007.