An Interface-based Modular Approach for Designing Distributed Event-based Systems