## 4 Discussion  
In the context of I4.0, new and exciting ecosystems are being created, with a complexity never seen before. Analyzing Figure 6, it is noticeable that new software architectures are needed. Our approach, with a focus on the phenomenon of cloud computing, presents a software architecture that embraces the three main pillars of I4.0 [7]: vertical integration on the shop floors, horizontal integration between several stakeholders, and end-to-end engineering. It is implementable even with legacy controllers as depicted in Section 3.4.2. During the development of this work, and aligned with the I4.0 concepts, we focused on the flexibility of communication between the several stakeholders (enhancing the horizontal integration) and the ability for traceability and trustability of produced parts (enhancing the end-to-end engineering concept). The architecture is very flexible since it was designed to have standard data models, enabling the use of new machines or retrofitting old ones and connecting them to other high-level systems such as MES or ERP (enhancing vertical integration). During the lifetime of a product, one or more actors can be connected or disconnected providing (or removing) valuable features. Although we recognize that this still has very low technical readiness, the use cases that we show in this document are provided by a synergy of different companies and academic institutions that represent several different stakeholders, distributed across several countries around Europe (namely Finland, Greece, and Portugal). MES systems have been extensively tested and even more than one constructed for the two use cases. In the case of ERP, several studies have been conducted, and we felt that the open-source available platform Odoo ([[https://www.odoo.com/](https://www.odoo.com/)]([https://www.odoo.com/](https://www.odoo.com/)) (accessed on 7 September 2023)) was suitable for the task. On the topic of trustability and traceability, the choice of blockchain was made because it is an emergent technology that we felt would be highly adopted by industrial stack holders. Regarding the blockchain mechanism, extended exploratory work was done, and Hyperledger Sawtooth was chosen. On this platform, a lot of work was done to be able to create the correct permissions and contracts to fulfill the demonstration of the architecture proposed. Other tools could be developed to work at the cloud level, for instance, an LCA tool, but we felt that to demonstrate the capability of adaptation and flexibility of the architecture, these kinds of tools were not needed. Also, a second tool of trustability could be developed based on the paradigm of private/public key and third parties' certificates, but again, the complexity and added value did not seem to add any additional value to the present work. The presented architecture (Figure 10) was fully validated with the set of tools that we present in this work. It is scalable and stable due to being based on publish/subscribe mechanisms. Although our implementation has not been tested in a high-demand environment, with a lot of publishing nodes, from our experience, the Kafka software can handle high availability and high throughput of messages. Regarding the trustability of the data, our implementation was based on Hyperledger Sawtooth with a consensus mechanism and showed no concerns, although few nodes were deployed. No tests regarding the speed of communications or communication losses were performed since our implementation was carried out mainly to validate the architecture and not the performance. Our verdict is that the architecture is valid but will always depend on the nature of the stakeholders. From our research, no other architecture demonstrates this flexibility nor does an implementation seem to take into account the traceability or trustability of data or other tools to support end-to-end engineering. So, we can state that our architecture touches the three main pillars of I4.0 and is directly proved to be supported by three of the eight enablers of I4.0.