Event-based computation