An Efficient Method for Automatic Antipatterns Detection of REST Web Services
DOI:
https://doi.org/10.13052/jwe1540-9589.2063Keywords:
REST, Web Services, Service-Oriented Architecture, Quality of Service(QoS), Anti-patterns DetectionAbstract
REST Web Services is a lightweight, maintainable, and scalable service accelerating client application development. The antipatterns of these services are inadequate and counter-productive design solutions. They have caused many qualitative problems in the maintenance and evolution of REST web services. This paper proposes an automated approach toward antipattern detection of the REST web services using Genetic Programming (GP). Three sets of generic, REST-specific and code-level metrics are considered. Twelve types of antipatterns are examined. The results are compared with the manual rule-based approach. The statistical analysis indicates that the proposed method has an average precision and recall scores of 98% (95% CI, 92.8% to 100%) and 82% (95% CI, 79.3% to 84.7%) and effectively detects REST antipatterns.
Downloads
References
N. Niknejad, W. Ismail, I. Ghani, B. Nazari, M. Bahari, and A. R. B. C. Hussin, ‘Understanding Service-Oriented Architecture (SOA): A systematic literature review and directions for further investigation,” Information Systems, vol. 91, p. 101491, 2020/07/01/2020, doi: https://doi.org/10.1016/j.is.2020.101491.
A. Huf and F. Siqueira, “Composition of heterogeneous web services: A systematic review,” J. Netw. Comput. Appl., Review vol. 143, pp. 89–110, Oct 2019, doi: 10.1016/j.jnca.2019.06.008.
A. Koenig, “Patterns and antipatterns,” The patterns handbook: techniques, strategies, and applications, vol. 13, p. 383, 1998.
F. Palma, N. Moha, Y. Gu, x00E, x00E, and neuc, “UniDoSA: The Unified Specification and Detection of Service Antipatterns,” IEEE Transactions on Software Engineering, pp. 1–1, 2018, doi: 10.1109/TSE.2018.2819180.
J. M. Roriguez, C. Mateos, and A. Zunino, “Assisting Developers to Build High-quality Code-first Web Service APIS,” Journal of Web Engineering, vol. 14, no. 3–4, pp. 251–285, Jul 2015.
F. Palma, J. Dubois, N. Moha, and Y.-G. Guéhéneuc, “Detection of REST Patterns and Antipatterns: A Heuristics-Based Approach,” in Service-Oriented Computing, Berlin, Heidelberg, X. Franch, A. K. Ghose, G. A. Lewis, and S. Bhiri, Eds., 2014// 2014: Springer Berlin Heidelberg, pp. 230–244.
J. Král and M. Zemlicka, “Crucial Service-Oriented Antipatterns, vol. 2,” International Academy, Research and Industry Association, IARIA, pp. 160–171, 2008.
J. Král and M. Žemlicka, “Popular SOA Antipatterns,” in 2009 Computation World: Future Computing, Service Computation, Cognitive, Adaptive, Content, Patterns, 15–20 Nov. 2009 2009, pp. 271–276, doi: 10.1109/ComputationWorld.2009.80.
D. Tripathi, U. Suman, M. Ingle, and S. Tanwani, “Towards Introducing and Implementation of SOA Design Antipatterns,” International Journal of Computer Theory and Engineering, vol. 6, no. 1, p. 20, 2014.
C. Mateos, M. Crasso, A. Zunino, and J. Coscia, “Detecting WSDL bad practices in code-first Web Services,” IJWGS, vol. 7, pp. 357–387, 01/01 2011, doi: 10.1504/IJWGS.2011.044710.
J. M. Rodriguez, M. Crasso, A. Zunino, and M. Campo, “Automatically Detecting Opportunities for Web Service Descriptions Improvement,” ed, 2010, pp. 139–150.
J. M. Rodriguez, M. Crasso, C. Mateos, and A. Zunino, “Best practices for describing, consuming, and discovering web services: a comprehensive toolset,” Software: Practice and Experience, vol. 6, no. 43, pp. 613–639, 2013.
M. A. Torkamani and H. Bagheri, “A Systematic Method for Identification of Anti-patterns in Service Oriented System Development,” International Journal of Electrical & Computer Engineering (2088-8708), vol. 4, no. 1, 2014.
Y. Zheng and P. Krause, “Asynchronous Semantics and Anti-patterns for Interacting Web Services,” in 2006 Sixth International Conference on Quality Software (QSIC’06), 27–28 Oct. 2006 2006, pp. 74–84, doi: 10.1109/QSIC.2006.14.
A. Ouni, R. G. Kula, M. Kessentini, and K. Inoue, “Web Service Antipatterns Detection Using Genetic Programming,” presented at the Proceedings of the 2015 Annual Conference on Genetic and Evolutionary Computation, Madrid, Spain, 2015.
A. Ouni, M. Kessentini, K. Inoue, and M. Ó. Cinnéide, “Search-Based Web Service Antipatterns Detection,” IEEE Transactions on Services Computing, vol. 10, no. 4, pp. 603–617, 2017, doi: 10.1109/TSC.2015.2502595.
H. Wang, M. Kessentini, and A. Ouni, “Bi-level Identification of Web Service Defects,” in Service-Oriented Computing, Cham, Q. Z. Sheng, E. Stroulia, S. Tata, and S. Bhiri, Eds., 2016// 2016: Springer International Publishing, pp. 352–368.
A. Ouni, H. Z. Wang, M. Kessentini, S. Bouktif, and K. Inoue, “A Hybrid Approach for Improving the Design Quality of Web Service Interfaces,” (in English), ACM Trans. Internet. Technol., Article vol. 19, no. 1, p. 24, Mar 2019, Art no. 4, doi: 10.1145/3226593.
H. Wang, M. Kessentini, T. Hassouna, and A. Ouni, “On the Value of Quality of Service Attributes for Detecting Bad Design Practices,” in 2017 IEEE International Conference on Web Services (ICWS), 25–30 June 2017 2017, pp. 341–348, doi: 10.1109/ICWS.2017.126.
S. Saluja and U. Batra, “Optimized approach for antipattern detection in service computing architecture,” Journal of Information Optimization Sciences, vol. 40, no. 5, pp. 1069–1080, 2019.
S. Tilkov, “REST Anti-Patterns,” InfoQ Article (July 2008), 2008.
C. Pautasso, “Some REST Design Patterns (and Anti-Patterns),” ed, 2009.
T. Fredrich, “Restful service best practices,” [Online]. http://www.restapitutorial.com/media/RESTfulBestPractices-v1, vol. 1, 2012.
C. Rodriguez et al., REST APIs: A Large-Scale Analysis of Compliance with Principles and Best Practices. 2016, pp. 21–39.
F. S. Alshraiedeh and N. Katuk, “A URI parsing technique and algorithm for anti-pattern detection in RESTful Web services,” International Journal of Web Information Systems, vol. 17, no. 1, pp. 1–17, 2021, doi: 10.1108/IJWIS-08-2020-0052.
C. Abid, M. Kessentini, and H. Wang, “Early prediction of quality of service using interface-level metrics, code-level metrics, and antipatterns,” Information and Software Technology, vol. 126, p. 106313, 2020/10/01/2020, doi: https://doi.org/10.1016/j.infsof.2020.106313.
S. Rebai, M. Kessentini, H. Wang, and B. Maxim, “Web service design defects detection: A bi-level multi-objective approach,” Information and Software Technology, vol. 121, p. 106255, 2020/05/01/2020, doi: https://doi.org/10.1016/j.infsof.2019.106255.
J. M. Rodriguez, M. Crasso, A. Zunino, and M. Campo, “Improving Web Service descriptions for effective service discovery,” Science of Computer Programming, vol. 75, no. 11, pp. 1001–1021, 2010/11/01/ 2010, doi: https://doi.org/10.1016/j.scico.2010.01.002.
N. Moha et al., “Specification and Detection of SOA Antipatterns,” in Service-Oriented Computing, Berlin, Heidelberg, C. Liu, H. Ludwig, F. Toumani, and Q. Yu, Eds., 2012//2012: Springer Berlin Heidelberg, pp. 1–16.
F. Palma, N. Moha, G. Tremblay, and Y.-G. Guéhéneuc, “Specification and Detection of SOA Antipatterns in Web Services,” in Software Architecture, Cham, P. Avgeriou and U. Zdun, Eds., 2014//2014: Springer International Publishing, pp. 58–73.
S. R. Chidamber and C. F. Kemerer, “A metrics suite for object oriented design,” IEEE Transactions on software engineering, vol. 20, no. 6, pp. 476–493, 1994.