Uppsats

Prestanda i ett GraphQL-API : Ett experiment med databaser och verktyg för hantering av N+1-problemet

M1-uppsats

Blekinge Tekniska Högskola/Institutionen för datavetenskap

Publicerad: 2024

Språk: Svenska

Nyckelord

klicka för att söka

Sammanfattning

Efficient performance is pivotal for digital service and product retention, necessitating consideration and design throughout system development. Central to this is the API, orchestrating communication between client and server within a system. GraphQL, created in 2012, revolutionized this interaction by enabling precise data requests. However, less sophisticated implementations of GraphQL often encounter the N+1 problem, where a query requiring N additional database queries is executed, leading to performance inefficiencies. With increasing data interconnectedness, query complexity and the choice of database management system (DBMS) become critical factors. This study investigates whether a GraphQL API performs better with Neo4j, a graph database, or MariaDB, a relational database, and evaluates how various N+1 problem solving tools influence API performance. The study conducted experiments with six API configurations, each subjected to five queries of varying complexity. One configuration utilized Neo4j, while the remaining five used MariaDB. Among the latter, three configurations integrated N+1 problem solving tools. The study shows that, when query complexity and data interconnectedness is low, response times from a GraphQL API using MariaDB, without solving the N+1-problem, are shorter than the response times of an API using Neo4j. It also demonstrates the efficacy of Neo4j when data becomes more interconnected. Furthermore, the study concludes that addressing the N+1 problem is crucial, and that different tools offer varying levels of performance in solving it. Tools that do manage to solve this issue commonly show a significant improvement in response times when interconnected data is requested.

Information

Lärosäte / institution
Blekinge Tekniska Högskola/Institutionen för datavetenskap
Publiceringsdatum
2024
Uppsatstyp
M1-uppsats
Språk
Svenska

Utforska vidare

Liknande uppsatser

Uppsatser med liknande ämnen och nyckelord.