CEP is a relatively new technology to process events and discover complex patterns inside streams of events. CEP engines are also known as Event Stream Processing (ESP) engines. Events can be anything that happens outside or inside your application. These events contain data about the business situations that occurred and information about the data (also known as metadata). A sequence of events from the same source is called an event stream.
By processing the event streams with business-defined patterns, you can detect and react to business situations in real time. For example, you can monitor a financial stock index in real time. If it reaches certain values within an hour, you can react to this by selling a percentage of the stock. The threshold values are defined in a CEP pattern. This pattern tells the CEP engine how to detect and react to this event.