CEP Use Cases
Let's look at few more use cases for CEP. You would notice that it's pretty hard (or next to impossible) for SQL or RDBMS or other stream processing systems to handle some of these.
Suppose we want to match pairs of stock quotes, where the first is an IBM quote with a price above $83 and the second is the next Microsoft quote to appear in the stream.
Suppose we want to match pairs of stock quotes, where the first is an IBM quote with a price above $83 and the second is the next quote (of any stock) with a price above the IBM price from the first quote.
Suppose we want to find a monotonically increasing temperature readings for a set of sensors, where the run lasts for at least 10 readings, and the first reading is greater than 78C.
Find anomalies in pressure vessel where the pressure readings are continuously more than average value of last 1 hour readings and this is repeated for 10 such readings along with pressure value increasing continuously at the same time within 1000 seconds.
Find patterns where more than one credit card transactions happen from two different locations within 1000 seconds for the same credit card by swiping.
Find the pattern where CDR records show different cell tower for same number within 1000 seconds where the towers are more than 25 km apart.
Suppose we wish to find a scenario where individual temperature and pressure readings are within limit but both are increasing continuously for 10 such readings within 1000 seconds with temperature more than 68 C and pressure 5 ATM.
The standard deviation of sensor reading is continuously out of 2 SIGMA in normal gaussian distribution for 10 readings within 1000 seconds with deviation increasing continuously.