Simulation of Software Architectures of Smart Ecosystems: Theory and Practice Valdemar Vicente Graciano Netoa , Wallace Manzanob , Pablo Oliveira Antoninoc and Elisa Yumi Nakagawab a Federal University of Goiás, Brazil b University of São Paulo, Brazil c Fraunhofer IESE, Germany Abstract Smart ecosystems combine various heterogeneous and independent software-intensive systems to enable complex functional- ities for highly dynamic smart applications, such as Industry 4.0, smart cities, transportation, automotive, and many other critical domains. Due to their complex nature, such ecosystems, which are often referred as to Systems-of-Systems (SoS), should be completely reliable and work without interruption or failures that could cause serious losses and damages. During the smart-ecosystem architectural design, the impact of eventual failures or architectural changes should then be predicted to avoid potential losses or damages. This tutorial presents a simulation-based approach to support the prediction, at design time, of the structure and behavior of smart-ecosystem architectures (which are inherently dynamic at runtime), aiming to evaluate whether the smart ecosystems can sustain their operation. To do that, we present the foundations and concepts associated with smart ecosystems/SoS and simulation, as well as the results of our multiple studies. We also offer hands-on experience in the simulation of software architectures, using artifacts associated with a pre-specified smart-ecosystem architecture and a free commercial simulator. We share with the European Conference on Software Architecture (ECSA 2021) audience the theoretical knowledge and practical experience that could leverage the adoption of simulation approaches during the development of software-intensive systems, in particular, those so complex and dynamic as smart ecosystems. Keywords Smart Ecosystem, System-of-Systems, Software Architecture, Simulation, Architectural Evaluation, DEVS 1. Introduction are replaced or reorganized at runtime. Due to the critical nature of the domains supported by them, smart ecosys- Software has been increasingly embedded into several tems should be reliable and work without interruption types of systems, making them smarter and software- or failures that could cause serious losses or damages. intensive, i.e., software has crosscut the entire system However, given the dynamic nature of smart-ecosystem development life cycle. Such software-intensive and inde- architectures, assuring the feasibility of each architec- pendent systems have been connected through commu- tural arrangement that a smart ecosystem can assume nication technologies, raising alliances of highly interop- at runtime requires a prior analysis, still at design time, erable constituent systems and forming what is known as to assure that both the smart-ecosystem structure and smart ecosystems or Systems-of-Systems (SoS)1 [1, 2, 3, behavior can be sustained when its architecture changes. 4]. Smart ecosystems combine heterogeneous and inde- Over the past years, different initiatives have been pendent constituent systems to offer complex functional- proposed to assure the quality of the software architec- ities for several critical application domains. Such ecosys- tures of smart ecosystems [5, 6, 7, 8, 9]. In the context tems have a considerably dynamic software architecture, of our research projects, we have explored the adoption i.e., the architecture has its structure changing over time of simulation and observed its capability to address the due to constituents that join and leave the ecosystems or prediction of the structure and behavior of such architec- tures at runtime [10, 11, 12, 13, 14]. In particular, we can ECSA’21: European Conference on Software Architecture, 13-17 mention ASAS [11] and Dynamic-SoS [13]. The former September 2021, Virtual from Växjö, Sweden Envelope-Open valdemarneto@ufg.br (V. V. Graciano Neto); comprises a simulation-based process-oriented approach wallace.manzano@usp.br (W. Manzano); for evaluating smart-ecosystem coalitions (i.e., each dif- pablo.antonino@iese.fraunhofer.de (P. O. Antonino); ferent architectural arrangements that a smart ecosystem elisa@icmc.usp.br (E. Y. Nakagawa) can present at runtime), whereas the latter is a method Orcid 0000-0003-2190-5477 (V. V. Graciano Neto); 0000-0001-5602-3023 for evaluating smart-ecosystem dynamic architectures, (W. Manzano); 0000-0002-9631-8771 (P. O. Antonino); 0000-0002-7754-4298 (E. Y. Nakagawa) benchmarking them still at design time to predict the © 2021 Copyright © 2021 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). architecture properties. CEUR CEUR Workshop Proceedings (CEUR-WS.org) Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 Motivated by the results achieved in our research in- 1 For sake of simplicity, smart ecosystems and SoS are used volving smart ecosystems/SoS and simulation, this tuto- interchangeably in the context of this text. rial provides for the ECSA attendees the theoretical foun- requirements level as a set of missions to be evaluated dations and hands-on experience on using simulation through behaviors that emerge during the simulations. models to evaluate, still at design time, the structure and During the tutorial: We provide an artifact for the behaviors of smart-ecosystem architectures at runtime. attendees with a pre-established evaluation plan, fol- More specifically, we provide (i) theoretical foundation on lowed by an explanation and a discussion. The evalu- smart ecosystems/SoS, dynamic software architectures, ation plan is composed of, for instance, a set of three and simulation; (ii) hands-on experience with a free and missions of a smart ecosystem and a set of metrics well-known commercial simulator (MS4Me2 ) in which associated with quality attributes such as functional participants have the opportunity to run simulation mod- suitability. An example of metrics is Functional Com- els using a pre-conceived software architecture specified pleteness (FCom), i.e., the degree to which the set of in a simulation formalism (i.e., DEVS [15]). functions covers all specified tasks and user objectives. The remainder of this text is structured as follows: Considering the set of the three pre-established mis- Section 2 covers the tutorial learning aspects, Section 3 sions, the simulation verifies how many of them are provides the technical aspects, and Section 4 introduces effectively achieved [14]. the presenters’ background. • Step 3. Specification of DEVS Simulation Models: DEVS simulation models are built in conformance to 2. Tutorial Learning Aspects the architectural design. During the tutorial: We provide a set of pre-built simulation artifacts such as This section provides the tutorial structure, the topics the Dynamic Reconfiguration Controller (which is a covered, learning objectives, key takeaways for the au- mechanism to manage the SoS reconfigurations to exer- dience, and the relevance of the theme addressed in this cise the multiple coalitions that a SoS can assume). We tutorial for ECSA. also provide the specification in DEVS of the smart- ecosystem architecture, followed by an explanation 2.1. Tutorial structure and discussion. This tutorial is organized in two phases: instructional • Step 4. Environment Installation and Simulation phase and practical phase. The first phase refers to an Deployment: This step involves the management of explanatory presentation on: (i) Fundamentals on smart the artifacts obtained in Step 3 and their deployment ecosystems, smart-ecosystem architectures, and Dynamic- into MS4Me. During the tutorial: We supervise the ASAS; and (ii) DEVS basics. The practical phase addresses attendees with the tool installation in their machines. a supervised MS4Me installation in the attendees’ ma- Following, we present the way to accordingly deploy chines and a hands-on experience applying what was the DEVS models into MS4Me and support them. presented in the previous phase, as follows: • Step 5. Simulation Execution and Architectural • Step 1. Design of the Architecture: Architects de- Analysis: This step consists in the launching of the sign the smart-ecosystem architecture from the specifi- simulation in MS4Me, monitoring it through obser- cations of the requirements and missions, which were vation, possibly interacting with the simulation, and established in the early phases of the engineering life exercising multiple architectural configurations. Data cycle. During the tutorial: Considering the time and execution traces are logged during this process for constraints of this tutorial, we provide the artifacts of further examination. During the tutorial: We stim- a pre-conceived architecture and explain and discuss ulate attendees to run the simulations over MS4Me the structure of this small-scale smart ecosystem. and accordingly evaluate the SoS architecture being simulated. • Step 2. Evaluation Planning: An evaluation plan prepared in this step is composed of one or more smart- • Step 6. Analysis Execution: This step performs an ecosystem missions to be observed, a set of different inspection of the execution traces in log files. Conclu- coalitions to be analyzed, and a set of metrics related sions are obtained according to the pre-established set to a given quality attribute to be measured. We pro- of missions, the manifested behaviors of the simulation vide and discuss an evaluation plan with parameters model, and corresponding metrics. During the tuto- to be measured during the simulation. These param- rial: We provide for the attendees a guided tour on eters include: (i) variables (metrics) to support the the analysis of the execution logs so that conclusions measurement during the simulation execution; and (ii) can be drawn on the properties analyzed regarding the behaviors to be observed that are often defined at the SoS architecture being simulated. 2 http://goo.gl/NmBBuu 2.2. Covered topics highly dynamic; (ii) The structure and behaviors of smart ecosystems must be planned and assessed at design time; The main topics covered in this tutorial are smart ecosys- and (iii) A simulation-based approach can evaluate smart- tems, smart-ecosystem software architectures, and simu- ecosystem architectures and predict their properties. lation. Smart ecosystem is the main topic and refers to an emerging topic in the software architecture research; so, they are presented herein under theoretical and ap- 2.5. Relevance for the ECSA Audience plied perspectives. Smart-ecosystem software archi- Smart ecosystems are one of the topics of interest of tectures have been mentioned in several studies over ECSA 2021 and an emerging relevant topic that repre- the past years [5, 8, 9], demonstrating the importance sents cutting-edge technology, imposing important chal- of this topic. We address it in this tutorial compilating lenges, including for the software architecture area. They the theoretical basis accumulated by our group and pre- also support critical domains in which failures can cause senting a practical analysis of such architectures using damages, losses, and financial harm. Hence, the estab- simulation. Simulation is broadly recognized as one of lishment of approaches to evaluate their architectures the main techniques to evaluate software architectures accordingly is imperative [8, 11]. Simulation supports [16]. Herein, we adopt DEVS simulation formalism for software architecture assessment [16, 17] and allows ar- evaluating multiple smart-ecosystem coalitions. chitects to (i) prototype large-scale systems and test their structure and behaviors at design time, (ii) anticipate/pre- 2.3. Learning objectives dict the consequences of architectural changes on the overall systems, and (iii) offer a visual appeal to enable This tutorial provides practical experience in evaluating the architects to draw new architectural alternatives to smart-ecosystem architectures. We rely on MS4Me and accordingly conform to the pre-established requirements. DEVS language, one of the main simulation formalisms Hence, the dissemination of knowledge on simulation, used in software engineering empirical studies and a simulators, and languages becomes very relevant in the language prepared to simulate SoS architectures [15]. software architecture community. Finally, this tutorial This tutorial copes with the following learning objectives: not only copes with the conference scope but also updates • Knowledge of fundamentals of smart-ecosystem the audience with findings, results recently published, architectures: Before offering a practical experience and experience from the industry. for the attendees, we aim to consolidate a consensual understanding of what we consider (in the context of 3. Tutorial Technical Aspects this tutorial) as smart ecosystems, their dynamic archi- tectures, and simulation. Hence, we discuss the nature The target audience comprises any ECSA attendees only of smart ecosystems besides the reconfigurations that requiring experience in basic programming. This half- can take place over their architecture at runtime; day workshop is structured as follows: (i) Instructional Phase: Instructors presentation - 10 minutes; Funda- • Introduction of DEVS for newcomers: We intro- mentals on smart ecosystems, their architectures, and duce DEVS as a formalism suitable for smart-ecosystem Dynamic-ASAS - 50 minutes; DEVS basics - 30 minutes; architectures by presenting the basics of DEVS mod- and (ii) Practical Phase: MS4Me Installation - 20 min- els (both atomic and coupled models), their canonical utes; Hands-on lab following the six steps presented in structure, and DEVSNL (DEVS Natural Language) used Section 2.1 - 60 to 120 minutes. Hence, this tutorial to specify DEVS simulation models in MS4Me; mixes expositive lecture and hands-on practical experi- • Introduction of a simulation approach: We ex- ence. This tutorial is conducted in a virtual mode, raising plain the steps to specify and evaluate smart-ecosystem specific technical challenges. Hence, we send the MS4Me architectures according to Dynamic-ASAS; and installation instructions before the workshop, and sup- plementary materials are available in https://ww2.inf.ufg. • Practical experience of smart-ecosystem simula- br/~insight/tutorialecsa2021/. We also record videos that tion: We equip the attendees with pre-programmed show the main activities as well as the expected results DEVS codes so they can deploy them in the MS4Me of those activities. platform and run simulations for assessing a smart- ecosystem architecture. 4. Background of Presenters 2.4. Key takeaways for the audience VALDEMAR VICENTE GRACIANO-NETO received The essential messages that we intend the audience re- his Ph.D. degree from the University of São Paulo, Brazil tains are: (i) Smart-ecosystem software architectures are and the Docteur degree from the Université Bretagne-Sud, France, in 2018. He is an Assistant Professor at the Fed- [5] P. Baumann, R. Samlaus, L. Mikelsons, T. Kuhn, eral University of Goiás, Brazil. He has co-authored more J. Jahic, Towards virtual validation of distributed than 80 peer-reviewed papers, besides co-organizing sci- functions, in: SummerSim, 2019, pp. 1–12. entific events, such as the Workshop on Modeling and [6] M. Guessi, F. Oquendo, E. Y. Nakagawa, Checking Simulation of Software-Intensive Systems (MSSiS) and the architectural feasibility of systems-of-systems Workshop on Blockchain-Based Software Architectures using formal descriptions, in: SoSE, 2016, pp. 1–6. (BlockArch at ICSA). He serves as a reviewer for impor- [7] M. Guessi, F. Oquendo, E. Y. Nakagawa, Ark: a tant vehicles, such as IEEE SoSE, IST, and IEEE Computer. constraint-based method for architectural synthesis He is a member of the Brazilian Computer Society. of smart systems, Software System Modeling 19 WALLACE MANZANO is a Masters’ candidate at the (2020) 741–762. University of São Paulo, Brazil. He has an Information [8] H. Cadavid, V. Andrikopoulos, P. Avgeriou, Ar- Systems Bachelors’ degree and a large experience on SoS, chitecting systems of systems: A tertiary study, model-driven development, and software architecture. Information and Software Technology 118 (2020). He is also an expert in DEVS language and simulators [9] H. Cadavid, V. Andrikopoulos, P. Avgeriou, (including MS4Me) and has accumulated large experience P. Broekema, System- and software-level architect- in simulations models over the past five years. ing harmonization practices for systems-of-systems PABLO OLIVEIRA ANTONINO is Head of the Embed- - an exploratory case study on a long-running large- ded Software Engineering department of the Fraunhofer scale scientific instrument, in: ICSA, 2021, pp. IESE, Germany. He holds a PhD in Computer Science 13–24. from Technische Universität Kaiserslautern, and has ex- [10] V. Graciano Neto, C. Paes, L. Garcés, M. Guessi, perience with the design, evaluation, and integration of F. Oquendo, E. Y. Nakagawa, Stimuli-SoS: A model- dependable embedded systems from various domains, based approach to derive stimuli generators in sim- such as automotive, avionics, agricultural and construc- ulations of software architectures of systems-of- tion machines, medical devices, and smart industries. The systems, Journal of the Brazilian Computer Society Industry 4.0 middleware BaSyx is mainly developed by 23 (2017) 13:1–13:22. employees in the department managed by Dr. Antonino. [11] V. V. Graciano Neto, L. Garcés, M. Guessi, C. Paes, ELISA YUMI NAKAGAWA is an associate professor W. Manzano, F. Oquendo, E. Y. Nakagawa, ASAS: at the University of São Paulo - USP, Brazil. She was a An approach to support simulation of smart sys- visiting researcher in 2020 at the Fraunhofer IESE, Ger- tems, in: HICSS, 2018, pp. 5777–5786. many, conducted her post-doctoral research at the Uni- [12] V. Graciano Neto, C. Paes, A. Rohling, W. Manzano, versity of South Brittany, France, in 2015, and Fraunhofer E. Y. Nakagawa, Modeling & simulation of software IESE, in 2012. She received her Ph.D. degree from USP in architectures of systems-of-systems: An industrial 2016. She has coordinated several international research report on the Brazilian space system, in: SpringSim, projects, has organized international conferences, and 2019, pp. 1–12. has served as a program committee member at many [13] W. Manzano, V. Graciano Neto, E. Y. Nakagawa, conferences and as a reviewer of various journals. She Dynamic-SoS: An approach for the simulation of published more than 180 papers in selective journals and systems-of-systems dynamic architectures, Com- conferences, in addition to books and book chapters. She puter Journal 63 (2020) 709–731. is a CNPq fellow and a member of IEEE and Brazilian [14] V. Graciano Neto, F. Horita, R. Santos, D. Viana, Computer Society. M. Kassab, W. Manzano, E. Y. Nakagawa, S.O.B (Save Our Budget) - A Simulation-Based Method for Prediction of Acquisition Costs of Constituents References of a System-of-Systems, iSys - Brazilian Journal on Information Systems 12 (2019) 6–35. [1] M. Goncalves, E. Cavalcante, T. Batista, F. Oquendo, [15] B. Zeigler, H. S. Sarjoughian, R. Duboz, J.-C. Souli, E. Y. Nakagawa, Towards a conceptual model for Guide to Modeling and Simulation of Systems of software-intensive system-of-systems, in: SMC, Systems, Springer-Verlag London, 2012. 2014, pp. 1605–1610. [16] L. Dobrica, E. Niemele, A survey on software ar- [2] B. Boehm, A view of 20th and 21st century software chitecture analysis methods, IEEE Transactions on engineering, in: ICSE, 2006, pp. 12–29. Software Engineering 28 (2002) 638–653. [3] M. Jamshidi, System of systems engineering - new [17] V. Bogado, S. Gonnet, H. Leone, Modeling and si- challenges for the 21st century, IEEE Aerospace mulation of software architecture in discrete event and Electronic Systems Magazine 23 (2008) 4–19. system specification for quality evaluation, Simula- [4] M. Maier, Architecting principles for systems-of- tion 90 (2014) 290–319. systems, Systems Engineering 1 (1998) 267–284.