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 the most commonly used data transfer protocols and concepts in this paper: REST, WebSocket, gRPC GraphQL and SOAP. To do that, 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 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.
翻译:许多软件设计师面临选择信息共享服务的最佳方式的问题。为了让通信技术发挥功能和实用性,它应该使开发者能够为处理的数据定义一套完整的CROUD方法。研究小组比较了本文中最常用的数据传输协议和概念:REST、WebSocket、GRPC GraphQL和SOAP。为了做到这一点,在Python安装了一套网络服务器,每个服务器都使用经审查的技术之一。然后,团队为一套定义的操作(创建实体、检索100个实体的名单和检索一个实体的细节)进行了自动基准测量时间和数据传输管理管理。设计测试的目的是避免数据库连接或嵌入环境特性干扰结果。研究小组的结论是,GRPC是最高效和可靠的数据传输方法。另一方面,GragQL是所有系统最慢的通信方法。此外,其服务器和客户图书馆在网络服务器的适当使用方面造成了最大的问题。SOAP没有参与一个现代化的网络解决方案的标准化,因为网络解决方案缺乏标准化。