Logic Based Coordination for Event-Driven Self-Healing Distributed Systems