The proliferation of the Internet of Things (IoT) technology in several business domains requires a well-defined and distributed infrastructure of system services that provides IoT device and data management and supports a proper application development. To address these issues we have developed COMPaaS, a web-based middleware platform to enable an easy and loosely coupled cooperation between applications and IoT devices, and also to facilitate the development of IoT applications. Some tests were performed to validate the middleware component of the platform and the results revealed that the middleware is able to process up to 1000 applications requests simultaneously and also notify the responses within an acceptable time for the applications. It indicates that not only the performance of the middleware is acceptable for IoT applications, but also that the cooperative approach imposed by the platform allows a satisfactory integration between the system modules and aggregates important value for the development of IoT applications.