Event-driven server (Template)