arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.07475cs.SE
收藏

对选定的因特网通信协议的比较审查

Comparative review of selected Internet communication protocols

Łukasz Kamiński, Maciej Kozłowski, Daniel Sporysz, Katarzyna Wolska, Patryk Zaniewski, Radosław Roszczyk

摘要:

由于通信方法和协议种类繁多,许多软件架构师都面临着为服务选择最佳方式来共享信息的问题。为了使通信技术具有功能性和实用性,它应该使开发人员能够为处理的数据定义一套完整的CRUD方法。研究团队在本文中比较了最常用的数据传输协议和概念:REST,WebSocket,gRPC GraphQL和SOAP。为此,我们用Python实现了一组Web服务器,每个服务器都使用一种研究过的技术。然后,该团队执行了一个自动化的基准测试,测量一组定义的操作的时间和数据传输开销:创建一个实体,检索100个实体的列表,并获取一个实体的详细信息。测试旨在避免结果受到数据库连接或docker-compose环境特征的干扰。研究小组得出结论,gRPC是最有效和可靠的数据传输方法。另一方面,GraphQL被证明是所有通信方法中最慢的。此外,它的服务器和客户端库在Web服务器中的正确使用方面造成了最多的问题。SOAP没有参与基准测试,因为它与Python的兼容性有限,并且在现代Web解决方案中缺乏普及性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑