ROUTE06

Technology

GraphQL and Apollo: The Expansion of Open Source Software and SaaS

2022-12-28

Takafumi Endo

Share

In recent years, a variety and large volume of data processing has become common in the operation of products such as web services and mobile applications, not only in large companies but also in startup companies that have just been established. WThanks to advancements in technology, particularly cloud computing, it is now possible to develop and operate web services that handle large volumes of data—such as video and voice—and applications requiring real-time responses and integration with multiple IoT devices, all without the need for specialized system construction or a dedicated team. This is becoming possible.

With the rise of communication technologies and standards like 5G, the volume of data processed has significantly increased. This has also accelerated opportunities to handle new types of data, such as personal data and health logs, via microdevices at high speeds and frequencies on the web. The demand for API integration with various external services and system integration across departments and affiliated companies within a company continues to increase, and software architecture is becoming more and more complex every year. In addition, the level of demand from users for quick response and stability is high, and the expression of user interfaces, such as dynamic components and personalization, is also becoming more sophisticated. The number of data processing issues, both front-end and back-end, and the solutions to address them, will continue to increase.

Given this context, this article introduces GraphQL, an open-source query language for Web APIs that has gained significant attention in recent years, along with Apollo Graph, a company that develops and operates an application platform built on GraphQL. When it comes to data processing technology, products and technologies of major tech companies such as Google, Amazon, and Microsoft tend to attract attention in general, but various open source software and related services such as Apollo GraphQL are used behind the scenes of all web services. However, various open source software and related services, such as Apollo GraphQL, are used behind the scenes of all web services.

GraphQL, a new query language for the Web API era

GraphQL is a Web API (Application Programming Interface) standard released by Facebook (now Meta) in 2015, and is used as an open-sourced query language in the development of web services and native applications worldwide It is used as an open-source query language in the development of web services and native applications around the world 1. GraphQL defines schemas using a novel 'graph' concept, allowing data requests to be made to a web server declaratively, similar to SQL. Compared to RESTful APIs, GraphQL offers better control over the frequency of HTTP requests, responses, and data volume, all through a single, simple endpoint (URI, URL, etc.). The design of multiple endpoints and methods is simple. Compared to the RESTful API, which emphasizes the design of multiple endpoints and methods, the client application developer has a clear learning curve and can be more agile in implementation. 12.

One of the advantages of using GraphQL relates to the number of HTTP requests that would be generated when trying to retrieve data of interest via the REST API. As an example, let's take product: you have a product ID and want to retrieve all product data. If we also want to retrieve the images, variants, and metafields for all products, we would have 4 unique HTTP calls. This is because in our REST, everything is a separate endpoint. This uses a tenth of our capacity, and with a recovery rate of 2 calls per second, it takes 2 seconds to recover 3.

Recent mobile applications often deal with large amounts of nested and interlinked data, and to improve system performance, the minimum amount of data required for a specific function (e.g., news feeds, posts, messages, etc.) module/domain must be referenced and GraphQL is a technology standard that has emerged from an era in which the implementation of functions and data processing on the client/front end of websites and native applications such as iOS/Andorid are becoming more diverse and faster, and in which microservices and API integration among various applications are required. GraphQL is a technology standard that was born from the background of the need for microservices and API integration between various applications, and has recently been adopted not only by Facebook (Meta), but also by other tech companies such as GitHub, Twitter, Shopify, Airbnb, Rakuten, Mercari, and large companies such as Walmart, Starbucks, and the New York Times, in addition to many others. Times, and other large companies, as well as in the development sites of startups around the world14.

On the other hand, GraphQL is a standard that emphasizes front-end developer experience, such as easy definition of necessary data structures on the client side, and is currently being used differently from REST according to the reliability of data between GraphQL servers and the characteristics of web applications. While it increases the flexibility of front-end implementations, it also has issues such as the complexity of back-end mechanisms such as GraphQL server design and node structures between graphs. To begin with, GraphQL is an open-source query language specification, and on the server side, it is necessary to build an environment in which queries are executed in the GraphQL runtime environment, and of course, security measures such as query request control and data caching mechanisms must be prepared separately. In recent years, Apollo and its development and operation company, Apollo Graph, have been attracting attention as an application platform that addresses such issues5.

GraphQL Architecture
Created by us based on the diagram in StepZen's "A New Architecture for APIs"
.

What is Apollo, the GraphQL application platform?

Apollo Graph is a software company that develops and manages a variety of applications designed to support client and server implementations of GraphQL. One of their products, Apollo Client (for front-end), provides various libraries for implementing UI and server data integration with GraphQL, and supports front-end languages such as React.js, Swift, and Kotlin. While GraphQL has issues such as the relative difficulty of caching by CDNs compared to REST APIs, Apollo Client provides functions to facilitate cache data integration and state management6. Apollo Graph also develops various applications related to GraphQL, including Apollo Server, a library and application for running GraphQL on a JavaScript server. Apollo Graph is a front-end developer's product that facilitates implementation in various languages and frameworks in the GraphQL environment, while server-side developers can build and manage the often complex GraphQL server, infrastructure, and other development environments in a secure and scalable manner. Server-side developers can build and manage the often-complex GraphQL server, infrastructure, and other development environments in a secure and scalable manner.

Apollo GraphQL
Created by us based on the diagram in "The Apollo GraphQL platform" by Apollo Graph
.

Apollo Graph is an OSS (Open Source Software) development community, but also a unicorn company that is highly regarded by world-class venture capitalists such as Andreessen Horowitz 7. Their products range from publicly available OSS to paid SaaS offerings, and in recent years, many software companies have adopted a similar business model. Apollo's open source library has grown to over 17 million downloads per month and over 6 billion queries executed daily as of August 20216.

According to Apollo Graphics, the company has already been awarded the SOC 2 Type II security certification by Walmart and Starbucks. In 2020, Netflix is expected to adopt Apollo Federation, an architecture for integrated management of multiple GraphQL servers and domain development. In 2020, Netflix will adopt Apollo Federation, an architecture for managing multiple GraphQL servers and domain development,8 and Apollo products are currently being deployed by Expedia, PayPal, and other large, multi-channel digital service companies.

"Apollo Federation will allow us to implement our existing schema linking in a safer, declarative manner, while opening up a whole new level of broader federation opportunities across the level of broader federation opportunities across the wider enterprise". Dan Boerner, Distinguished Product Manager at Expedia Group 9.

Expedia Appolo GraphQL
Created by us based on the diagram in "Expedia Group Transforms Product Development with Apollo"
.

Walmart had already adopted a BFF (Backend For Frontend) architecture, which was already a microservice and front-end friendly development environment, but it took about 14 months from planning and research to migrate its e-commerce platform to a GraphQL architecture using Apollo. to a GraphQL architecture that leverages Apollo. According to their published materials, the result was the unification of multiple carts, search functions, etc. that had previously existed, highlighting the improved convenience for users as well as the developer experience10.

OSS and the Potential of SaaS for the Enterprise

In October 2022, Apollo Graph will announce GraphOS, which will support the construction of infrastructure for large-scale systems that bundle multiple GraphQL APIs and groups of servers, with the aim of becoming a marketplace for data access connected to a variety of microservices, from enterprise networks to external API services. We aim to become a marketplace for data access connected to a variety of microservices, from enterprise networks to external API services. It is expected that the company will enhance its enterprise-oriented functions and promote a platform strategy that can be expected to have network effects, in conjunction with the expansion of Apollo's functions as SaaS, as well as the feedback of knowledge to the OSS development community, The evolution and utilization of GraphQL-related technologies will continue to accelerate in the future.

In the history of software development, not only Apollo Graph, but also MongoDB, GitLab, and other OSS communities have been supported by many technology companies that develop and operate commercial applications for OSS, On the other hand, there are many products such as GitHub for git that were developed as SaaS with different functions and spread, while originating from the OSS technology. Especially in the enterprise domain, commercialized SaaS tends to be preferred in terms of security and development man-hours, and it is expected that more and more OSS in specialized technical areas such as GraphQL will be converted to SaaS for enterprise use in the future. We hope this article proves useful for those exploring case studies of GraphQL and Apollo Graph, or for those considering business ventures related to OSS and its SaaS.

Apollo GraphQL

脚注

  1. The GraphQL Foundation23

  2. My First GraphQL|by Eve Porcello and Alex Banks, translated by Saya Ozaki and Yasushi Ando.

  3. Shopify|GraphQLとAPIレート制限について

  4. Meta|GraphQL: A data query language

  5. StepZen|A New Architecture for APIs

  6. Apollo Graph Inc2

  7. Andreessen Horowitz|Apollo GraphQL

  8. Netflix Technology Blog|How Netflix Scales its API with GraphQL Federation (Part 1)

  9. Apollo Graph Inc|Expedia Group Transforms Product Development with Apollo

  10. Apollo Graph Inc|How Walmart Global Tech Redesigned and Unified their Customer Experience in Just 11 months

SaaSOpen SourceEnterpriseDevOps

About the Author

Takafumi Endo is a graduate of the Graduate School of Information Sciences at Tohoku University. After graduation, he worked at the Development Bank of Japan Inc. and Dream Incubator Inc. He then founded Smarby, Inc., where he served as CEO. After the company's acquisition by a major apparel company through an M&A, he became Director, CPO, and CMO at STRIPE DEPARTMENT CO., LTD. Following his involvement as an EIR at Delight Ventures, Inc., he founded ROUTE06 and became its Representative Director.


New Articles

Research

History of Regulations and Japanese Companies' Efforts to Reduce Greenhouse Gas Emissions [Part 1]

In New Logistics Markets Expanding by 'Cold' (Part I), we looked at examples from Africa to see how cold chain construction has enriched and made safer the lives of people living there. In this second part, we will look at the state of the cold chain in Asia.

Details