## 6 Evaluation  
In this section, we demonstrate the validation of the case study since the process steps of the proposed approach for the efficient deployment of microservices are covered in our previous work [1]. The metamodels described in the previous sections appear as diagrams to the designer at runtime. While the definition of microservices and communication patterns among them are carried out using the Microservice Definition and Communication Metamodel, the nodes required for allocating services to physical resources are designed using the Microservice Infrastructure Metamodel. After these structural features of the proposed model-driven architecture are completed, the runtime execution configuration parameters of the system are also defined using the Microservice Execution Configuration Metamodel. The aim is to obtain the total minimum cost by assigning the services that are in frequent communication with each other to the same node, taking into account the execution costs of the services on the nodes. Therefore, a genetic algorithm proposed in [28] is implemented to consider communication and execution costs for microservices. Figure 2 shows a sample deployment alternative generated from the proposed model-driven architecture.  
To validate the approach using the online book-shopping case study, two different CTAP [29] methods were evaluated concerning the total execution and communication cost metrics. Many algorithms suitable for the CTAP can be easily adapted as plugins to this architecture. This architecture generates efficient deployment alternatives using an algorithmic approach and is also suitable for manual deployment. Thus, the designer can manually deploy microservices, and the system enables comparison of manual and algorithmic approaches.  
As seen in Table 3, total execution and communication costs vary among different algorithmic approaches. The genetic algorithm performs better than the Minimum Nodes algorithm in terms of execution cost by 14.3%. On the other hand, the Minimum Nodes algorithm has the lowest communication cost by 23% compared to the genetic algorithm. The improvement rate in terms of the communication cost is reasonable because the communication cost among services allocated on the same node is calculated as zero according to the CTAP [29]. The algorithm aims to allocate each service to the minimum number of nodes. Therefore, this algorithm utilizes all memory of a node, then starts to assign microservices on the other node until the node's memory is full.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Microservice Name** & **Publishes** & **Publish Rate (Hz)** & **Subscribes** \\ \hline AccountService & User & 5 & - \\  & Seller & 3 & - \\  & Customer & 3 & - \\ BookInventoryService & Cancellation & 4 & Transaction \\ OrderService & CardDetails & 2 & PaymentSystem \\ ShippingService & Transaction & 2 & Cancellation \\ \hline \end{tabular}
\end{table}
Table 2: Publish/subscribe relation schema for the case study.  
When we examined the processing time of the proposed algorithm for generating feasible deployment of microservices [30], we saw that the performance of the deployment process depended on the applied CTAP algorithm and the number of microservices. Therefore, the communication and execution cost for each microservice instance was calculated according to the CTAP solution. When we analyzed the formulation of CTAP problem [30], the time complexity of the total cost could be represented by O(n\({}^{3}\)) in a worst-case scenario.