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
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
- Författare
- Martin, Fooladi, Pontus, Åkerberg
- 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.
M1-uppsats, Blekinge Tekniska Högskola/Institutionen för datavetenskap
Fritzson, David, Persson, Vincent
Publicerad: 2026
M1-uppsats, Blekinge Tekniska Högskola/Institutionen för datavetenskap
Andersson, Timothy
Publicerad: 2026
M1-uppsats, Blekinge Tekniska Högskola/Institutionen för datavetenskap
Shirin, Ajou
Publicerad: 2026
M1-uppsats, Blekinge Tekniska Högskola/Institutionen för datavetenskap
Svensson, Erik
Publicerad: 2023
M1-uppsats, Mittuniversitetet/Institutionen för data- och elektroteknik (2023-)
Ejelöv, Jessica
Publicerad: 2023
M1-uppsats, KTH/Hälsoinformatik och logistik
Al Khateeb, Ahmad, Summaq, Abdulrazzaq
Publicerad: 2023