Performance comparison of REST vs GraphQL in different web environments : Node.js and Python

Detta är en Kandidat-uppsats från Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)

Sammanfattning: Application Programming Interfaces (APIs) are still relevant today in most modernweb applications. Some studies have compared the performance of RepresentationState Transfer (REST) and GraphQL in order to assess scenarios in which one out-performs the other. However, there is a lack of comparative studies exploring thescenarios of different programming languages. In this study/thesis, we focused onNode.js and Python, which are widely utilized by developers, due to their popular-ity. We aimed to fill this research gap by examining and comparing the scenariosof these two languages. We also considered comparing performance-centric frame-works like Fastify and FastAPI and traditional/feature-rich frameworks like Expressand Flask. Two applications were built for each framework comparing their perfor-mance in terms of response time, throughput and server-side resources. These weretested with JMeter and a custom middleware. Results show that GraphQL outper-forms REST in most scenarios. The environment that performed the best was Fastifywith GraphQL sacrificing CPU Usage.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)