Applying System Descriptors to Address Ambiguity on Deployment Diagrams
Total Page:16
File Type:pdf, Size:1020Kb
Applying system descriptors to address ambiguity on deployment diagrams Jalves Nicacio Fabio Petrillo Université du Québec à Chicoutimi Université du Québec à Chicoutimi Chicoutimi, Québec, Canada Chicoutimi, Québec, Canada [email protected] [email protected] ABSTRACT 1 INTRODUCTION Communication between practitioners is essential for product qual- In a modelling process, several levels of abstraction can represent ity in the DevOps context. This communication often takes place software systems across different resources, such as text or dia- through deployment diagrams of a system under development. grams. Deployment diagrams are useful for communication and However, it is common diagrams to become ambiguous or incon- understanding of systems, as they motivate a more active discus- sistent as the system progresses and goes to a continuous delivery sion among participants as facilitating the memorization of details pipeline or production. Moreover, diagrams could not follow the about systems [15]. evolution of systems, and it is challenging to associate diagrams to Nowadays, the growth and rapid adoption of DevOps are notori- production. In this paper, we propose the use of system descriptors ous. The benefits obtained by the software industry through con- to address the ambiguity of deployment diagrams. We state three tinuous integration, testing, monitoring and delivery processes are main hypotheses (1) if a deployment diagram is generated from a undeniable. Additionally, the adoption of systems descriptors, such valid system descriptor then the diagram is unambiguous; (2) if a as Puppet, Chef, Docker-compose and Kubernetes Pods, proved to valid system descriptor is generated from a deployment diagram be a prominent approach to increase the quality and productivity then the descriptor is unambiguous; (3) if a diagram ` generated of information systems. from a descriptor 퐴 is unambiguous and if a descriptor 퐵 is gener- However, system diagrams (as UML deployment diagrams) usu- ated from the diagram ` equally unambiguous then descriptors 퐴 ally remain schematic and disassociated from production reality. and 퐵 are equivalent. We report a case study to test our hypothe- Furthermore, diagrams do not follow the evolution of the systems, ses. We constructed a system descriptor from Netflix deployment and there are challenges for engineers to synchronize the diagrams diagram, and we applied our tool to generate a new deployment with the system in production. diagram. Finally, we compare the original and generated diagrams Deployment diagrams are complex to design. Observing architec- to evaluate our proposal. Our case study shows the generated de- ture diagrams from technical blogs of Amazon, Linkedin, or Netflix, ployment diagrams are graphically equivalent to system descriptors we noticed that engineers use general-purpose notations to create and eliminated ambiguous aspects of the original diagram. Thus, models in tools such as Visio or previous draw.io. Furthermore, few our preliminary results lead to further evaluation in controlled and deployment diagrams are created using UML (or partially using empirical experiments to test our hypotheses conclusively. them). Brown [7] states that it is common for engineers to reuse el- ements designed in other diagrams, using the copy-paste technique, CCS CONCEPTS but this can lead to making mistakes and inconsistencies. Moreover, • Computer systems organization ! Distributed architectures; the semantic and semiotic variation of graphical notations for the • Software and its engineering ! System description lan- representation of systems architecture gives engineers the freedom guages; Architecture description languages. to adapt graphical components to different domains, but it also allows ambiguous diagrams. KEYWORDS Thus, in this, paper, we propose the use of system descriptors to address the ambiguity of deployment diagrams. We state three main arXiv:2008.11060v2 [cs.SE] 2 Oct 2020 Deployment diagrams, System architecture, System descriptors hypotheses (1) if a deployment diagram is generated from a valid ACM Reference Format: system descriptor then the diagram is unambiguous; (2) if a valid Jalves Nicacio and Fabio Petrillo. 2018. Applying system descriptors to system descriptor is generated from a deployment diagram then address ambiguity on deployment diagrams. In . ACM, New York, NY, USA, the descriptor is unambiguous; (3) if a diagram ` generated from 8 pages. https://doi.org/ a descriptor 퐴 is unambiguous and if a descriptor 퐵 is generated from the diagram ` equally unambiguous then descriptors 퐴 and 퐵 are equivalent. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed To evaluate our hypotheses, we performed a case study from for profit or commercial advantage and that copies bear this notice and the full citation a single system descriptor: Docker-compose files. In this way, we on the first page. Copyrights for components of this work owned by others than ACM have implemented a prototype capable of generating architecture must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a diagrams from docker-compose files. The prototype reads all blocks fee. Request permissions from [email protected]. of information and analyzes them according to a meta-model that ,, transforms the tags in the docker-compose file into a visual element © 2020 Association for Computing Machinery. https://doi.org/ of the corresponding diagram. ,, Nicacio and Petrillo The main contribution is to present our hypotheses and our pre- the system, diagrams do a better job when it comes to transmitting liminary evaluation, showing the generated deployment diagram data to humans [12]. could be equivalent to system descriptors and eliminate ambiguous Diagram as Code. Diagram as Code is an approach to generate aspects of the original diagram. The remainder of this paper is diagrams in the same way that IaC generates systems infrastruc- organized as follows: Section 2 presents relevant concepts for this ture: through programming. According to [19], Diagram as Code is research (Section 2.1) and defines and contextualizes the ambiguity the design of systems architecture diagrams, using a specific pro- on deployment diagram (Section 2.2). Our proposal is formalized gramming language to describe the diagram’s elementsand their in Section 3. In Section 4, we describe a study carried out with a relationships. tool prototype that generates deployment diagrams from Docker- This approach has sparked recent interest among software engi- Compose files. In Section 5, we present and discuss a preliminary neering practitioners. A non-exhaustive list of some web articles on evaluation. Section 6 presents related work. Section 7 concludes the subject is given in [6, 12, 18, 19]. Table 1 presents a list compiled our work and presents future works. by [12] of Diagram as Code tools and that we extend by adding two 2 CONTEXT more tools found on the Web: Diagrams [19] and diagrams-as-code [18]. We divided this section into two subsections. Firstly, we present the most relevant concepts for this paper in 2.1. Then, in Section 2.2, Table 1: "Diagram as code" tool list. The list has been ex- we introduce the definition of ambiguity on deployment diagram. tended from [12] 2.1 Relevant concepts Tool Language License Local Online Systems descriptors. They are scripts for automation, standard- Graphviz DOT Eclipse Public License 1.0 yes yes ization and management of infrastructure in production environ- PlantUML Text GPL-3.0 yes yes Mermaid Text MIT License yes yes ments. System descriptors emerge within the context of Infras- Ditaa ASCII LGPL-3.0 yes no tructure as Code (IaC), which specifies the definition and setup WSD Text - no yes of the software infrastructure required to run a system by using code2flow Text - no yes configuration scripts [5]. Structurizr Java, .NET - no yes In practice, system descriptors are artifacts that describe a system Diagrams Python MIT License yes no diagram-as-code Javascript - yes yes architecture. Providers, such as Chef, Dockerfile and Puppet [11, 22, 24], are tools that produce system descriptors. Likewise, container orchestrators, such as Docker-Compose and Kubernetes Pods [10, As far as we know, this is the first work to introduce the diagram 16], also produce system descriptors. as a code approach in the scientific community. The system descriptor files are written in different languages, Deployment diagrams. There is a vast literature on deploy- such as JSON, YAML, or even in a specific domain language (DSL), ment diagrams. According to the UML Specification [14], “deploy- as is the case with the Puppet tool. They can still be written in ment diagrams show the configuration of run-time processing el- general-purpose languages, as is the case with the Chef tool that ements and the software components, processes, and objects that uses Ruby to generate the system descriptor scripts. execute on them”. Another definition says that a deployment dia- The Listing 1 illustrates a system descriptor: a docker-compose gram is a graph of nodes connected by communication associations script that details the configuration of the database service, called [9]. One of the deployment diagram functions is to map the software db. According to the script’s instructions,