Event processing framework