Evaluating GraphQL over REST within an .NET Web API : A controlled experiment conducted by integrating with the Swedish Companies Registration Office

University essay from Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)

Abstract: It is only a matter of time before the Swedish Companies Registration Office makes digital registration of annual reports/auditors reports mandatory. At the time of writing, there are only ten public integrators currently able to handle this requirement. In collaboration with one of the big four accounting firms, this project aims to evaluate performance of the response time while using GraphQL versus REST in Web APIs. The application under test is a .NET application integrating to the Swedish Companies Registration Office API. Through a controlled experiment using two different GraphQL frameworks, HotChocolate and GraphQL for .NET, this thesis provides a knowledge base for the partnered accounting firm, developers and other stakeholders that are evaluating the use of GraphQL in their future applications. Results  from the experiment indicate that HotChocolate in its current version is not only faster than its competitor GraphQL for .NET, but also faster than REST. This is surprising, given that other related work seems to suggest that this is not always the case. Testing of GraphQL for .NET gives a more traditional result when compared to other related work. Given the results, a senior developer of HotChocolate was contacted to gain insight to why the framework outperforms not only GraphQL for .NET but also REST. The senior developer states that a large amount of effort has been put in to make the GraphQL execution engine more optimized, something that is corroborated by this thesis experiment. HotChocolate is also periodically measuring and comparing performance benchmarks to other libraries to conclude on its performance in different scenarios. The analysis of the experiment concluded that there exists another important variable previously not identified in other research, more precisely the chosen framework, that has a large impact on performance and can impact both memory allocation and response time.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)