Komparasi RESTful API dan GraphQL Dalam Arsitektur Database (Studi Kasus: Mamikos)
KRISNA ATTAYENDRA, Dr.Techn. Khabib Mustofa, S.Si., M.Kom.
2019 | Skripsi | S1 ILMU KOMPUTERPemilihan model arsitektur dan sistem yang digunakan merupakan komponen dalam membangun sebuah web service. Terlebih pada perusahaan berjenis startup yang memiliki mobilitas tinggi dalam pengembangan produk dan fiturnya. Salah satu sistem yang umum digunakan dalam membangun sebuah web service adalah RESTful API, yang juga diterapkan oleh salah satu perusahaan startup bernama Mamikos. Mamikos adalah sebuah platform pemesanan kost yang memiliki lebih dari dua juta pengguna aktif dan tujuh puluh ribu properti didalam servisnya. Dalam membangun sebuah web service, selain RESTful API terdapat GraphQL, query language yang dipublikasikan oleh Facebook. GraphQL dianggap mampu melakukan handling request yang menyesuaikan kebutuhan klien (Lee Byron, 2015). Dengan handling request yang baik, maka ada kemungkinan untuk dilakukan optimasi response time dan package size yang dihasilkan. Oleh karena optimasi response time dan package size yang memungkinkan untuk dilakukan, Mamikos ingin melihat apakah GraphQL bisa digunakan untuk menduplikasi struktur data dari arsitektur database mereka yang menggunakan sistem RESTful API dan seberapa signifikan optimasi yang didapatkan. Metode yang digunakan adalah komparasi performa response time dan package size. Setelah melakukan implementasi staging untuk menduplikasi sistem yang sudah berjalan, hipotesis diambil berdasarkan uji statistik two-tailed t-Test dan melihat P-value yang dihasilkan. Berdasarkan hasil uji statistik, diketahui bahwa P-value dari data pengujian response time dan package size lebih rendah dari nilai alpha sama dengan 0.05 yang telah ditentukan. Kemudian bisa diambil kesimpulan bahwa hipotesis-0 bisa ditolak dan terdapat perbedaan performa response time dan package size yang signifikan antara RESTful API dan GraphQL.
The selection of architectural models and systems used are components in building web services. Especially for startups that have high mobility in developing products and features. One system that is commonly used in building web services is RESTful API, which was also implemented by one of the startup companies called Mamikos. Mamikos is a boarding booking platform that has more than two million active users and seventy thousand properties in its service. In building a web service, in addition to the RESTful API there is GraphQL, a query language published by Facebook. GraphQL can be responsible for handling requests that match client needs (Lee Byron, 2015). With good handling requests, it is possible to optimize response time and the resulting package size. Because of the possible optimization of response time and package size, Mamikos wants to see whether GraphQL can be used to duplicate data structures from their database architectures that use RESTful API systems and how significant the optimization is. The method used is the comparison of the response time performance and package size. After implementing the staging implementation to duplicate the system that is already running, the hypothesis is taken based on the two-tailed t-Test statistical test and sees the P-value produced. Based on the results of the statistical test, it is known that the P-value of the response time test data and the package size lower than the alpha value equals 0.05. Then it can be concluded that hypothesis-0 can be rejected and there is a significant difference in the performance of response time and package size between RESTful API and GraphQL.
Kata Kunci : RESTful API, GraphQL, perbandingan performa