## 8 Conclusions  
In summary, we present a symmetrical architecture that enables two-way communication between IoT devices and Applications and Clients and, thus, allows users and systems to understand and manage a physical environment. Furthermore, we extend the possibilities of the architecture with a CEP model for transforming IoT events into meaningful business events. Based on the proposed architecture and the CEP model, we provide an implementation that could serve any IoT-enabled application context. We exemplify it with a smart farming case in an IoT-enabled greenhouse. The implementation includes a library of Composite Transformations that each describes, in detail, the gradual and sequential steps for transforming an event. Specifically, three fundamental Composite Transformations are included: ingestion, event splitting, and calculation of the average value of measurements. The appropriateness and possibility of inclusion and integration of the implementation in a production environment are demonstrated by showcasing the functionality in a smart farming domain through four scenarios that each reflect a user's requirements. In addition, we comment on and discuss the quality properties trade-offs that increase user engagement by allowing them to adapt the provided services based on their requirements, which arise mainly from the conditions that prevail in the natural environment.  
Ultimately, this paper contributes with implementation based on the proposed architecture and CEP model that follows a highly flexible bottom-up approach (since all data originate from IoT or Application layers) to create IoT services. These IoT services collectively provide the highest possible visibility and control over a complex system, thus increasing user engagement. As a result, this approach may significantly impact the overall architecture and its evolution. In fact, it is intended that our architecture interact with a large number of distributed and heterogeneous event sources and sinks (e.g., sensors and actuators, respectively) that observe and operate in any application context. This is typical of most CEP scenarios, such as environmental monitoring, business process automation, and control systems. From another point of view, our CEP model and its implementation show how we eventually transform the IoT events to business events, reflecting the requirements and knowledge of the IoT-enabled business domain. The proposed implementation could be duplicated, expanded, and deployed in IoT domains with similar business requirements by researchers and practitioners interested in IoT architectures and systems. For example, this implementation could easily, and without modification, serve in temperature monitoring in a smart building, such as a house or even a hospital.  
Our architecture can already manage and interact with IoT devices in any IoT-enabled domain, such as smart city, smart industry; however, we still need to realize some limitations that we intend to address in the future. We aspire to make the data distribution in the architecture more scalable, since this is a main requirement for IoT architectures. Moreover, we want to extend the CEP model to support common CEP patterns and also extend the architecture to support actuation in the IoT physical context, i.e., implementation of the process engine. We intend to make such improvements to ensure the proposed architecture's generalizability. Last but not least, we could also study the quality properties of the architecture.  
**Author Contributions:** All authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.  
**Funding:** The research presented has received funding from the European Union's Project H2020 PHYSICS (GA 101017047).  
**Data Availability Statement:** Not applicable.  
**Conflicts of Interest:** The authors declare no conflict of interest.