The Physically-Asynchronous Logically-Synchronous (PALS) system is a recently proposed architectural pattern for cyber-physical systems. It guarantees a logically synchronous design abstraction for real-time distributed computations. In this work, we develop a new middleware, called PALSware, to support an efficient and robust implementation of the PALS system and its extensions. PALSware guarantees consistency in distributed applications by eliminating any asynchronous interactions resulting from distributed clocks and node failures. We present a layered design for this middle-ware that is both reusable in different system architectures and can be extended with architecture-specific solutions for fault management. We demonstrate the middleware for an academic control testbed and show the consistency in a fault injection framework designed for this middleware.