Affiliation:
1. 1 Faculty of Electrical Engineering , Warsaw University of Technology , Warsaw , Poland
Abstract
Abstract
With a large variety of communication methods and protocols, many software architects face the problem of choosing the best way for services to share information. For communication technology to be functional and practical, it should enable developers to define a complete set of CRUD methods for the processed data. The research team compared this paper’s most commonly used data transfer protocols and concepts: REST, WebSocket, gRPC GraphQL and SOAP. A set of web servers was implemented in Python, each using one of the examined technologies. Then, the team performed an automated benchmark measuring time and data transfer overhead for a set of defined operations: creating an entity, retrieving a list of 100 entities and fetching details of one entity. Tests were designed to avoid the results being interfered with by database connection or docker-compose environment characteristics. The research team has concluded that gRPC was the most efficient and reliable data transfer method. On the other hand, GraphQL turned out to be the slowest communication method of all. Moreover, its server and client libraries caused the most problems with proper usage in a web server. SOAP did not participate in benchmarking due to limited compatibility with Python and a lack of popularity in modern web solutions.
Reference17 articles.
1. gRPC official documentation. https://grpc.io/docs/what-is-grpc/core-concepts/. Accessed on May 17, 2022.
2. Protocol buffers official documentation. https://developers.google.com/protocol-buffers/docs/overview. Accessed on May 17, 2022.
3. Bolanowski M., Żak K., Paszkiewicz A., Ganzha M., Paprzycki M., Sowiński P., Lacalle I., and Palau C. E. Eficiency of REST and gRPC realizing communication tasks in microservice-based ecosystems. 2022.10.3233/FAIA220242
4. Brito G. and Valente M. T. REST vs GraphQL: A controlled experiment. In 2020 IEEE international conference on software architecture (ICSA), pages 81–91. IEEE, 2020.10.1109/ICSA47634.2020.00016
5. Chamas C. L., Cordeiro D., and Eler M. M. Comparing REST, SOAP, socket and gRPC in computation offloading of mobile applications: An energy cost analysis. In 2017 IEEE 9th Latin-American Conference on Communications (LATINCOM), pages 1–6. IEEE, 2017.10.1109/LATINCOM.2017.8240185