Understanding the event-driven communication design pattern