Simple reactor pattern implementation