Integrating and Optimizing Event-Driven Architecture