GraphQL Sorgu Oluşturma Sürecinde Kullanılan Araç ve YöntemlerinAnalizi ve İyileştirilmesi

Günümüzde yaşanan teknolojik gelişmeler, İnternete bağlanan toplam cihaz tür ve sayısında büyük bir artışa yol açmıştır. Sunucu makineler daha fazla istek almaya başlamış hem ağ trafiği hem de sunucu yanıt süresi olumsuz etkilenmiştir. Bu sorunları çözmek için Facebook tarafından 2015 yılında duyurulan GraphQL teknolojisi tek bir istekle birden fazla tablo, koleksiyon veya veri tabanına erişim sağlayarak toplu veri sorgulama ve değiştirmeye imkân vermektedir. Bu sayede cihaz başına düşen istek sayısı ve cihazların belleklerinde tutulacak veri boyutu azalır. Ancak GraphQL yeni bir teknoloji olduğundan henüz kod geliştirme sürecini yöneten ve kolaylaştıran araçlar tam olarak gelişmemiştir. Sunucu kısmında sorguları oluşturmak ve çalıştırmak için önemli miktardaki kodun elle yazılması gerekmektedir. Bu da yazılım geliştiricilere önemli bir iş yüküoluşturmaktadır. Bu çalışmada GraphQL sorgu geliştirme süreci, bu süreci kolaylaştırmak veya otomatikleştirmek için kullanılan araçlar, bu araçların kullandığı yöntemler ve sorgu geliştirme maliyetleri analiz edilmiştir. Bu maliyeti azaltmak için kodları otomatik oluşturan bir yöntem önerilmiş ve bu yöntemi kullanan bir araç geliştirilmiştir. Geliştirilen yöntemin etkinliğidiğer yöntemlerle karşılaştırılmış, sayısal olarak incelenmiş ve yazılımcıları önemli miktardaki kodu tekrar yazmaktan kurtararak zamandan tasarruf sağladığı görülmüştür.

Analysis and Improvement of Tools and Methods Used in GraphQL Query Building Process

Nowadays, as a result of developing technology, increasing device diversity, and the total number of devices connected to the Internet, servers have started to receive more requests adversely affecting both network traffic and server response time. Foreliminating these problems, in 2015, Facebook announced GraphQL technology allowing multiple tables, collections, ordatabases can be accessed instantly via a single request and a single answer. Therefore, the number of requests per device andthe size of the data to be kept in the memory of the devices is reduced significantly. However, it is necessary to write codemanually to create and run the GraphQL queries on the server part due to the lack of adequate code management and automationtools. Thus, it creates an additional workload for the developer. In this study, we have analyzed the tools used to automate orfacilitate the query development process of GraphQL and compared the cost of query development. A new method and tool forgenerating GraphQL queries have been developed and its effectiveness has been compared to other methods and evaluatedquantitively. The results show that the developers save time by avoiding the burden of writing many lines of code.

___

  • [1] Li, L., Chou, W., Zhou, W., & Luo, M. (2016). Design Patterns and Extensibility of REST API for Networking Applications. IEEE Transactions on Network and Service Management, 13(1), 154–167. https://doi.org/10.1109/TNSM.2016.2516946
  • [2] Ghebremicael, E. S. (2017). Transformation of REST API to GraphQL for OpenTOSCA. https://doi.org/10.18419/opus-9352
  • [3] Howtographql. (2020). GraphQL is the better REST. Retrieved March 3, 2020, from https://www.howtographql.com/basics/1-graphql-isthe-better-rest/
  • [4] He, H. (2008). Graphs-at-a-time : Query Language and Access Methods for Graph Databases, 405–417.
  • [5] Facebook. (2015). GraphQL. Retrieved February 28, 2020, from http://spec.graphql.org/July2015/
  • [6] Hartig, O., & Pérez, J. (2018). Semantics and Complexity of GraphQL Preprint Version *. 27th World Wide Web Conference on World Wide Web (WWW).
  • [7] GraphQL. (2020). Who’s Using | GraphQL. Retrieved March 3, 2020, from https://graphql.org/users/
  • [8] Drupal. (2020). Usage statistics for GraphQL | Drupal.org. Retrieved March 3, 2020, from https://www.drupal.org/project/usage/graphql
  • [9] Vogel, M., Weber, S., & Zirpins, C. (2018). Experiences on Migrating RESTful Web Services to GraphQL, 2, 283–295.
  • [10] Wittern, E., Cha, A., & Laredo, J. A. (2017). Generating GraphQL-Wrappers for REST(-like) APIs. In ICWE 2018. Springer, Cham.
  • [11] Rasool, S., Khan, R., & Mian, A. N. (2019). GraphQL and DC-WSN-Based Cloud of Things. IT Professional, 21(1), 59–66. https://doi.org/10.1109/MITP.2018.2876982
  • [12] Taskula, T. (2019). Advanced Data Fetching with GraphQL: Case Bakery Service.
  • [13] Guo, Y., Deng, F., & Yang, X. (2018). Design and Implementation of Real-Time Management System Architecture based on GraphQL Design and Implementation of Real-Time Management System Architecture based on GraphQL. In IOP Conf. Ser.: Mater. Sci. Eng. (p. 466). https://doi.org/10.1088/1757- 899X/466/1/012015
  • [14] Vargas, D. M., Mayor, U., Sim, D. S., Blanco, A. F., Pablo, J., Alcocer, S., … Bergel, A. (2018). Deviation Testing: A Test Case Generation Technique for GraphQL APIs, 1–9.
  • [15] Torres, A., Galante, R., Pimenta, M. S., Jonatan, A., & Martins, B. (2017). Twenty years of object-relational mapping : A survey on patterns, solutions, and their implications on application design, 82, 1–18. https://doi.org/10.1016/j.infsof.2016.09.009
  • [16] Porcello, E., & Banks, A. (2018). Learning GraphQL: Declarative Data Fetching for Modern Web Apps. O’Reilly Media.
  • [17] Wernet, C. (2017). Unifying access to data from heterogeneous sources through a RESTful API using an e icient and dynamic SQL-query builder. Hochschule Karlsruher Technik und Wirtschaft.
  • [18] Apollo. (2020). Executing a query. Retrieved February 29, 2020, from https://www.apollographql.com/docs/react/data/querie s/
  • [19] Relay. (2020). QueryRenderer. Retrieved March 2, 2020, from https://relay.dev/docs/en/queryrenderer
  • [20] Prisma. (2020). GraphQL Usage - Prisma. Retrieved March 3, 2020, from https://www.prisma.io/with-graphql
  • [21] Rodriguez-Echeverria, R., Cánovas Izquierdo, J. L., & Cabot, J. (2017). Towards a UML and IFML Mapping to GraphQL. In ICWE 2017 (pp. 149–155). Springer Verlag. https://doi.org/10.1007/978-3-319- 74433-9_13
  • [22] PostGraphile. (2020). CRUD Mutations. Retrieved March 3, 2020, from https://www.graphile.org/postgraphile/crud-mutations/
  • [23] Hasura.io. (2020). Realtime GraphQL on PostgreSQL. Retrieved May 10, 2020, from https://hasura.io/
  • [24] StG. (2020). Swagger-to-GraphQL. Retrieved February 29, 2020, from https://www.npmjs.com/package/swagger-to-graphql
  • [25] Costal, D., Farré, C., Gómez, C., Jovanovic, P., Romero, O., & Varga, J. (2017). Semi-automatic Generation of Data-Intensive APIs. Retrieved from http://opendataajuntament.barcelona.cat/data/en/dataset
  • [26] Electronjs. (2020). GraphiQL | Apps | Electron. Retrieved March 4, 2020, from https://www.electronjs.org/apps/graphiql
  • [27] Chen, T. H., Shang, W., Jiang, Z. M., Hassan, A. E., Nasser, M., & Flora, P. (2014). Detecting performance anti-patterns for applications developed using object-relational mapping. Proceedings - International Conference on Software Engineering, (CONFCODENUMBER), 1001–1012. https://doi.org/10.1145/2568225.2568259
  • [28] MongoDB. (2020). The database for modern applications. Retrieved March 4, 2020, from https://www.mongodb.com/
  • [29] JFoenix. (2020). JavaFX Material Design Library. Retrieved May 11, 2020, from http://www.jfoenix.com/
  • [30] Javapoet. (2020). Javapoet: A Java API for generating .java source files. Retrieved March 4, 2020, from https://github.com/square/javapoet
  • [31] Kozma, D., Varga, P., & Larrinaga, F. (2019). Data-driven Workflow Management by utilising BPMN and CPN in IIoT Systems with the Arrowhead Framework. IEEE International Conference on Emerging Technologies and Factory Automation, ETFA, 2019-Septe, 385–392. https://doi.org/10.1109/ETFA.2019.8869501
  • [32] Howtographql. (2019). Alternative approaches to schema development. Retrieved March 4, 2020, from https://www.howtographql.com/graphqljava/11-alternative-approaches/
  • [33] Biying, L. (2010). Jetty improves the performance of network management system based on TR069 protocol. 2010 IEEE International Conference on Intelligent Computing and Intelligent Systems, 3, 799–801. https://doi.org/10.1109/ICICISYS.2010.5658303
  • [34] McConnell, S. (2006). Software Estimation : Demystifying the Black Art. Microsoft Press, pp 136.
  • [35] Capers, J., & Bonsignour, O. (2011). The Economics of Software Quality. Addison-Wesley