# A Model-Driven Approach for Solving the Software Component Allocation Problem
###### Abstract  
The underlying infrastructure paradigms behind the novel usage scenarios and services are becoming increasingly complex--from everyday life in smart cities to industrial environments. Both the number of devices involved and their heterogeneity make the allocation of software components quite challenging. Despite the enormous flexibility enabled by component-based software engineering, finding the optimal allocation of software artifacts to the pool of available devices and computation units could bring many benefits, such as improved quality of service (QoS), reduced energy consumption, reduction of costs, and many others. Therefore, in this paper, we introduce a model-based framework that aims to solve the software component allocation problem (CAP). We formulate it as an optimization problem with either single or multiple objective functions and cover both cases in the proposed framework. Additionally, our framework also provides visualization and comparison of the optimal solutions in the case of multi-objective component allocation. The main contributions introduced in this paper are: (1) a novel methodology for tackling CAP-alike problems based on the usage of model-driven engineering (MDE) for both problem definition and solution representation; (2) a set of Python tools that enable the workflow starting from the CAP model interpretation, after that the generation of optimal allocations and, finally, result visualization. The proposed framework is compared to other similar works using either linear optimization, genetic algorithm (GA), and ant colony optimization (ACO) algorithm within the experiments based on notable papers on this topic, covering various usage scenarios--from Cloud and Fog computing infrastructure management to embedded systems, robotics, and telecommunications. According to the achieved results, our framework performs much faster than GA and ACO-based solutions. Apart from various benefits of adopting a multi-objective approach in many cases, it also shows significant speedup compared to frameworks leveraging single-objective linear optimization, especially in the case of larger problem models. component allocation; model-driven engineering; heterogeneous systems; multi-objective optimization +
Footnote †: journal: _Appl. of the Acm. provide a number of resources that are consumed by the software components. In a component-based software system, designers and architects need tools to find optimal allocations which minimize resource consumption. Solving CAPs has become very important considering the heterogeneity of computer systems today and the advances in component-based software engineering, which has enabled the freedom and ease to make different allocations of software components on the available computation units [5; 6; 7]. Allocating the components to the units is formulated as an optimization problem with a single objective function in the case of single-objective CAPs or multiple objective functions in the case of multi-objective CAPs. The presented framework provides a solver that solves CAP in both cases. In addition, the framework provides different ways to visualize and compare the optimal solutions to CAP problems in the case of multi-objective CAPs. The paper also presents a toolset for reading and validating CAP models. In addition, the toolset implements a solver for solving CAPs and generating allocation models. Furthermore, the optimal allocations can be visualized using a number of different plots to better help the designers when making component allocation decisions. The main contributions of this paper are as follows:  
1. A new MDE-based methodology for solving CAPs. The methodology is centered around the use of newly introduced meta-models and models for defining CAPs and representing their solutions. 2. A toolset comprising several Python scripts for reading the CAP models and generating optimal allocations. CAPs can be solved using the toolset assuming single-objective or multi-objective cost functions. The organization of the paper is as follows.