API Composition at Scale: GraphQL Federation vs. REST Aggregation

Authors

  • Kiran Kumar Pappula Independent Researcher, USA. Author
  • Sunil Anasuri Independent Researcher, USA. Author

DOI:

https://doi.org/10.63282/3050-9246.IJETCSIT-V2I2P107

Keywords:

API Composition, GraphQL Federation, REST Aggregation, Microservices, Distributed Systems, Performance Evaluation

Abstract

With the emergence of distributed systems in the contemporary world, orchestration and composition of a wide variety of microservices has become an essential aspect of developing scalable and maintainable software systems. In the following sections, the paper will guide the reader through the concept of API composition at scale and compare the two most popular approaches: GraphQL Federation and REST-based Aggregation. As microservice architectures have increasingly gained popularity, so have API gateways and composition layers to make sense of the relations between heterogeneous services. GraphQL Federation: The addition of GraphQL Federation enables services to expose a single, combined GraphQL schema to clients, allowing them to execute queries that cross service boundaries transparently. On the contrary, REST Aggregation is based on the composition of the REST endpoint responses on an API gateway or an aggregation level. In this work, the approaches are compared with each other in terms of latency, developer experience, and maintainability complexity. With empirical data and analysis of architecture and performance, we demonstrate that although GraphQL Federation offers better extensibility and a schema-driven development experience, REST Aggregation is more approachable and easier to work with in less-connected service environments. We employ architectural design, real-world testing, and benchmarking. Observations show that GraphQL Federation can significantly decrease client-side logic and accelerate the development pace, however, at the expense of increased orchestration complexity. The paper extends the knowledge in the area of scalable API composition. It serves as a guide for system architects to select the most suitable approach for addressing the context-specific situation of large-scale service integration

Downloads

Download data is not yet available.

References

[1] Fielding, R. T. (2000). Architectural styles and the design of network-based software architectures. University of California, Irvine.

[2] Richardson, L., & Ruby, S. (2008). RESTful web services. "O'Reilly Media, Inc.".

[3] Tilkov, S. (2007). A brief introduction to REST. InfoQ, Dec 10.

[4] Taelman, R., Van Herwegen, J., Vander Sande, M., & Verborgh, R. (2018, September). Comunica: a modular SPARQL query engine for the web. In International Semantic Web Conference (pp. 239-255). Cham: Springer International Publishing.

[5] Wieckhusen, D. (2006). The development of API manufacturing processes–targets and strategies. Chimia, 60(9), 598-598.

[6] Trivedi, B., & Shah, B. H. (2012). Scale up of API. International Journal of Scientific Engineering and Technology, 1(2), 190-196.

[7] Barr, D., & Montalvo, M. (2005). API Facilities. In Good Design Practices for GMP Pharmaceutical Facilities (pp. 339-382). CRC Press.

[8] Am Ende, D., Bronk, K. S., Mustakis, J., O’Connor, G., Santa Maria, C. L., Nosal, R., & Watson, T. J. (2007). API quality by design example from the torcetrapib manufacturing process. Journal of Pharmaceutical Innovation, 2(3), 71-86.

[9] Christopher McWilliams, J., & Guinn, M. (2018). Early Phase API Process Development Overview. Early Drug Development: Bringing a Preclinical Candidate to the Clinic, 1, 11-30.

[10] Nadareishvili, I., Mitra, R., McLarty, M., & Amundsen, M. (2016). Microservice architecture: aligning principles, practices, and culture. " O'Reilly Media, Inc.".

[11] Verborgh, R., Van Hooland, S., Cope, A. S., Chan, S., Mannens, E., & Van de Walle, R. (2015). The fallacy of the multi-API culture: Conceptual and practical benefits of representational state transfer (REST). Journal of Documentation, 71(2), 233-252.

[12] O’Brien, W. (2012). A Web Application in REST: The design, implementation, and evaluation of a web application based on Representational State Transfer.

[13] Zheng, C., Le Duigou, J., Bricogne, M., Dupont, E., & Eynard, B. (2016). An interface model enabling a decomposition method for the architecture definition of mechatronic systems. Mechatronics, 40, 194-207.

[14] Papazoglou, M. P., & Van Den Heuvel, W. J. (2007). Service-Oriented Architectures: Approaches, Technologies, and Research Issues. The VLDB journal, 16(3), 389-415.

[15] Weyns, D. (2010). Architecture-based design of multi-agent systems. Springer Science & Business Media.

[16] Kumar, S., Jantsch, A., Soininen, J. P., Forsell, M., Millberg, M., Oberg, J., ... & Hemani, A. (2002, April). A network-on-chip architecture and design methodology. In Proceedings of the IEEE Computer Society Annual Symposium on VLSI. New Paradigms for VLSI Systems Design. ISVLSI 2002 (pp. 117-124). IEEE.

[17] Vesić, M., & Kojić, N. (2020, October). Comparative analysis of web application performance in the case of using REST versus GraphQL. In Proceedings of the Fourth International Scientific Conference on Recent Advances in Information Technology, Tourism, Economics, Management and Agriculture (ITEMA), Online-Virtual (pp. 17-24).

[18] Brito, G., & Valente, M. T. (2020, March). REST vs GraphQL: A controlled experiment. In 2020, IEEE International Conference on Software Architecture (ICSA) (pp. 81-91). IEEE.

[19] Stünkel, P., von Bargen, O., Rutle, A., & Lamo, Y. (2020). GraphQL Federation: A Model-Based Approach. J. Object Technol., 19(2), 18-1.

[20] Brito, G., Mombach, T., & Valente, M. T. (2019, February). Migrating to GraphQL: A practical assessment. In 2019, IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) (pp. 140-150). IEEE.

[21] Cha, A., Wittern, E., Baudart, G., Davis, J. C., Mandel, L., & Laredo, J. A. (2020, November). A principled approach to GraphQL query cost analysis. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (pp. 257-268).

[22] Rahul, N. (2020). Vehicle and Property Loss Assessment with AI: Automating Damage Estimations in Claims. International Journal of Emerging Research in Engineering and Technology, 1(4), 38-46. https://doi.org/10.63282/3050-922X.IJERET-V1I4P105

[23] Enjam, G. R., & Chandragowda, S. C. (2020). Role-Based Access and Encryption in Multi-Tenant Insurance Architectures. International Journal of Emerging Trends in Computer Science and Information Technology, 1(4), 58-66. https://doi.org/10.63282/3050-9246.IJETCSIT-V1I4P107

Published

2021-06-30

Issue

Section

Articles

How to Cite

1.
Pappula KK, Anasuri S. API Composition at Scale: GraphQL Federation vs. REST Aggregation. IJETCSIT [Internet]. 2021 Jun. 30 [cited 2025 Sep. 13];2(2):54-6. Available from: https://ijetcsit.org/index.php/ijetcsit/article/view/339

Similar Articles

51-60 of 212

You may also start an advanced similarity search for this article.