📝

What is AppSync

に公開

This blog is the English version of the following blog.
https://zenn.dev/mn87/articles/725793f9a3c24f

AWS official

Serverless Graphql Apis - AWS AppSync - AWS

AWS AppSync GraphQL APIs enable developers to access exactly the data they need, via a flexible API that securely accesses, manipulates, and combines data from multiple sources.

GraphQL

Managed GraphQL APIs - Amazon AppSync - AWS

GraphQL is a query and manipulation language for APIs. GraphQL provides a flexible and intuitive syntax to describe data requirements and interactions. It enables developers to ask for exactly what is needed and get back predictable results. It also makes it possible to access many sources in a single request, reducing the number of network calls and bandwidth requirements, therefore saving battery life and CPU cycles consumed by applications.

Web API初心者と学ぶGraphQL #GraphQL - Qiita

GraphQLはAPI用のクエリ言語である
1回のリクエストで多くのリソースを得ること も できる
GraphQLでは、単一のエンドポイントへ、欲しいリソースをHTTP POSTのbodyに明示的に記載してリクエストすることで、必要なリソースを1回のリクエストで取得し、この問題を解消しようと試みています。

  • With REST API, multiple endpoints are needed to obtain the required resources.
  • With GraphQL, the necessary resources can be retrieved with a single request to a single endpoint.

AppSync and API Gateway

「AppSync VS APIGateway 両者の違いをスタートアップCTOが本気で考えてみた!」低コストなモダナイズ開発の実践 | Ragate

AppSync の役割は?
ズバッと言いますが、AppSync は GraphQL のエンドポイントを提供します。
API Gateway は複数のAPIエンドポイントを提供しますが、AppSync はGraphQL コードを受け付ける1つのエンドポイントしか提供しません。(1つのエンドポイントへ POST を受け付けるイメージ)

Use Cases

  • A game application using a real-time scoreboard
  • A customer service dashboard
  • Applications using “likes,” messaging, location, or proximity information
  • A chat application with presence indication and conversation history features

It can also be used offline and automatically updates when back online.
I think the image in the official AWS comic below gives a good visual understanding.
AWSマンガ 第4話「リアルタイムのチャット機能を実装しろ!」(1/4) | AWS

Practical Examples

AWS AppSync Customers | Managed GraphQL APIs | Amazon Web Services

Cookpad delivers a community platform for people to share recipe ideas and cooking tips. Cookpad uses AWS AppSync in their cooking Live app, which allows people to watch live cooking shows delivered by chefs, professional cooks and celebrities, and is available for Android, iOS, and FireTV.

“We use AWS AppSync for real-time interactions, such as questions, comments, likes, stamps, and viewer count during our live show broadcasts. AWS AppSync is able to automatically scale to support an audience of thousands of viewers who simultaneously connect at the beginning of the live cooking show and send a high-volume of messages throughout the program.”

Summary

This time, I looked into Amazon Elastic Transcoder.
Here are the key points:

  • A fully managed service that simplifies the development of GraphQL APIs
  • With GraphQL, you can retrieve the necessary resources in a single request to a single endpoint
  • AppSync works by accepting POST requests to a single endpoint
  • Often used for real-time processing

It was basic information, but I hope it can be helpful to someone.

References

Discussion