DeAI Research
Source ·

REST or GraphQL?

2019Matheus Seabra; Marcos Nazário; Gustavo Pinto

cid d389fe017d3a4ee49ba2341a3c0181907fe2922659bd412c85d81810cefbdda3 · original · via openalex

Title: REST or GraphQL?
Authors: Matheus Seabra; Marcos Nazário; Gustavo Pinto
Venue: 
Year: 2019
Canonical: doi:10.1145/3357141.3357149
URL: https://doi.org/10.1145/3357141.3357149
Collector: openalex
OA: false

ABSTRACT
Given the variety of architectural models that can be used, a frequent questioning among software development practitioners is: which architectural model to use? To respond this question regarding performance issues, three target applications have been studied, each written using two models web services architectures: REST and GraphQL. Through research of performance metrics of response time and the average transfer rate between the requests, it was possible to deduce the particularities of each architectural model in terms of performance metrics. It was observed that migrating to GraphQL. resulted in an increase in performance in two-thirds of the tested applications, with respect to average number of requests per second and transfer rate of data. However, it was noticed that services after migration for GraphQL performed below its REST counterpart for workloads above 3000 requests, ranging from 98 to 2159 Kbytes per second after the migration study. On the other hand, for more trivial workloads, services on both REST and GraphQL architectures presented similar performances, where values between REST and GraphQL services ranged from 6.34 to 7.68 requests per second for workloads of 100 requests.