Complex event processing (or CEP) is a way of understanding what is happening in a system and reacting to it in real time. It uses computer code to observe different sorts of things, like people doing things or sensors measuring things, and then finds patterns in what it sees. If it suspects something important is happening, it can react quickly and do something useful. For example, if CEP sees a bunch of people coming along a road, it might realize that there is a traffic jam, and then tell someone to re-route the traffic or send an alert to drivers.