PIM: A Novel Architecture for Coordinating Behavior of Distributed Systems