Complex Event Processing (CEP) is a method for tracking and analyzing streams of information about events that happen in a system, and deriving conclusions from them. In many applications, however, the information that needs to be analyzed is not structured as a mere sequence of partially ordered timed events, but as graphs of highly interconnected datasets that evolve over time.

This website provides the implementation code for the case studies described in our paper entitled "Extending Complex Event Processing to Graph-structured Information" [1], which proposes an extension of CEP systems that permits dealing with graph-structured information, in addition to their timed-events stream processing capabilities, and its implementation using graph tecnologies based on cluster computing platforms.

Case Studies


Let us assume a fleet of motorbikes equipped with sensors that produce real-time information about their state, including the pressure of their two tires, their location and speed, and whether the driver on the seat or not. We are interested in monitoring them, being able to detect in real time flat tires, vehicle crashes or accidents. In particular, we are interested in the following derived events:

  • BlowOutTire: The pressure of one of the tires of a moving motorbike goes down from more than 2.0 BAR to less than 1.2 BAR in less than 5 seconds.
  • Crash: The speed of a motorbike goes from more than 50 km/h to 0 km/h in less than 3 seconds.
  • DriverLeftSeat: The seat sensor detects that the motorbike driver has left the seat.
  • Accident: A moving motorbike suffers a blow out of one of its tires, then a Crash event is detected, and the driver is thrown out, everything within less than 3 seconds.
Spark Patterns can be viewed in the following link: motorbikeGraphx.txt

Cypher Patterns can be viewed in the following link: motorbikeCypher.txt

The Motorbike with Spark and Esper technologies are in our Git repository [2].

Social Network

Consider a system that needs to take into account the information provided by Flickr and Twitter, and use it together to identify some situations of interest.

  • HotTopic: a hashtag has been used by both Twitter and Flickr users at least 100 times in the last hour.
  • PopularTwitterPhoto: the hashtag of a photo is mentioned in a tweet that receives more than 30 likes in the last hour.
  • PopularFlickrPhoto: a photo is favorited by more than 50 Flickr users who have more than 50 followers.
  • NiceTwitterPhoto: a user, with an h-index higher than 50, posts three tweets in a row in the last hour containing a hashtag that describes a photo.
  • Misunderstood: a Flicker user favorites a photo identified as NiceTwitterPhoto but none of her followers do.
  • InfluencerTweeted: taking into account the 10,000 most recent tweets, a user with h-index higher than 70 and more than 50K followers who writes a tweet raises an InfluencerTweeted event.
Spark Patterns can be viewed in the following link: TwitterFlickrGraphx.txt

Some Cypher Patterns can be viewed in the following link: TwitterFlickrCypher.txt

The code of this example with Spark technology is in our Git repository [2].


[1] Gala Barquero, Loli BurgueƱo, Javier Troya, Antonio Vallecillo: Extending Complex Event Processing to Graph-structured Information. In Proc. of the ACM/IEEE 21th International Conference on Model Driven Engineering Languages and Systems 2018 (MODELS 2018). Copenhagen, Denmark, October 2015. [PDF] http://doi.org/10.1145/3239372.3239394

[2] GraphCEP Git repository, 2018. https://github.com/atenearesearchgroup/graphCEP.git. Accessed: July 2018.