Principles and Applications of Distributed Event-based Systems