aws / aws/aws-appsync-community

Appsync integration with AWS IOT is really inefficient and uneconomical

Open
#153 3 comments 5 reactions 0 assignees View on GitHub
feature-request
Dominant language
HTML
Stars
507
Forks
37
PR merge metrics
No merged PRs in 30d

Description

It is simply not economical to run millions of IOT updates through Appsync where active GraphQL users scan for the 0.00001% they are interested in. A much more efficient solution has been proposed in this form post:
https://forums.aws.amazon.com/thread.jspa?threadID=271817&tstart=0

Re: adding subscription resolvers for extended pubsub queries
With the flexibility of GraphQL directives, you could support other type of subscriptions, for example, something like:
type Subscription {
onMachineStateUpdate(id: ID): MachineState @aws_iot_subscribe(topic: [\"/MachineState/\\"])
}
Then a client could listen to IoT topics, through that subscription.

This scheme is very efficient since it leaves all of the IOT updates irrelevant to the active GraphQL users inside the IOT subsystem. When the GraphQL subscription starts, appsync would do the iot-subscribe and then tear it down when the user stops listening. MQTT messages from the IOT subscription would be applied as mutations. This is not something an external user can implement, the AppSync team needs to build this.

Contributor guide

Open the contributing guide

Research direction

Read the issue description and the linked AWS forum proposal first; no repository file, test, or entry point is identified. Done would require an AppSync-supported subscription-resolver or directive design that routes selected AWS IoT topics to GraphQL subscribers, as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql
Domain
api, backend-api-design, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.