A Genetic Algorithm to Find the Adequate Granularity for Service Interfaces
Daniele Romano, Martin Pinzger · 2014
The relevance of the service interfaces' granularity and its architectural impact have been widely investigated in literature. Existing studies show that the granularity of a service interface, in terms of exposed operations, should reflect their clients' usage. This idea has been formalized in the Consumer-Driven Contracts pattern (CDC). However, to the best of our knowledge, no studies propose techniques to assist providers in finding the right granularity and in easing the adoption of the CDC pattern. In this paper, we propose a genetic algorithm that mines the clients' usage of service operations and suggests Façade services whose granularity reflect the usage of each different type of clients. These services can be deployed on top of the original service and they become contracts for the different types of clients satisfying the CDC pattern. A first study shows that the genetic algorithm is capable of finding Façade services and outperforms a random search approach.