Performance comparison of programming interfaces on the example of REST API, GraphQL and gRPC

Mariusz Śliwa

mariusz.sliwa1@pollub.edu.pl
Lublin University of Technology (Poland)

Beata Pańczyk


(Poland)

Abstract

The article presents a comparison of the performance of three ways of implementing programming interfaces used in web applications - REST, GraphQL and gRPC. For the purposes of the research, three applications were developed, which were made in each of the indicated technologies and with the same functionalities. The applications were used for performance tests carried out with the use of the k6 tool. The applications are used to measure the execution time, performance and volume of processed data during display and adding operations. The obtained results allowed for the conclusion that the best interface in terms of performance (measured as the number of transactions per second) and server response time is REST. However, in terms of the smallest data volume, gRPC is the best choice.


Keywords:

REST, gRPC, GraphQL, performance testing

What is an API? (Application Programming Interface), https://www.mulesoft.com/resources/api/what-is-an-api, [10.09.2021]
  Google Scholar

B. M. Balachandar, RESTful Java Web Services: A pragmatic guide to designing and building RESTful APIs using Java, 3rd Edition, Packt Publishing, 2017.
  Google Scholar

Dokumentacja gRPC, https://grpc.io/docs, [01.03.2021]
  Google Scholar

A. Tuban, REST vs gRPC vs GraphQL, https://technologyrivers.com/blog/rest-vs-grpc-vs-graphql, [01.03.2021]
  Google Scholar

R. Rocha, APIs REST, GraphQL or gRPC – Who wins this game?, https://www.sensedia.com/post/apis-rest-graphql-or-grpc-who-wins-this-game, [01.03.2021]
  Google Scholar

A. F. Helgason, Performance analysis of Web Services: Comparison between RESTful & GraphQL web services, University of Skövde, http://his.diva-portal.org/smash/record.jsf?pid=diva2:1107850, 2017, [01.03.2021]
  Google Scholar

Wprowadzenie do .NET, https://docs.microsoft.com/en-us/dotnet/core/introduction, [10.09.2021]
  Google Scholar

Dokumentacja JavaScript-owego API biblioteki k6, https://k6.io/docs/javascript-api, [10.09.2021]
  Google Scholar

Download


Published
2021-12-30

Cited by

Śliwa, M., & Pańczyk, B. (2021). Performance comparison of programming interfaces on the example of REST API, GraphQL and gRPC. Journal of Computer Sciences Institute, 21, 356–361. https://doi.org/10.35784/jcsi.2744

Authors

Mariusz Śliwa 
mariusz.sliwa1@pollub.edu.pl
Lublin University of Technology Poland

Authors

Beata Pańczyk 

Poland

Statistics

Abstract views: 1589
PDF downloads: 1027