Observer pattern for distributed systems