TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Build a Realtime Serverless GraphQL API with Websockets on AWS

88 pointsby techjackeralmost 7 years ago

4 comments

chrisco255almost 7 years ago
I&#x27;ve been experimenting with AppSync and it seems promising. The only thing I hem and haw about is the resolver templates, which are written in VTL (as opposed to JS). I asked the core devs about this on Twitter and they said it&#x27;s so they can have a deterministic bound on the execution time for resolvers against Dynamo. Still, seems to me like giving the option of lightweight JS resolvers with bounded execution time would be a good feature. I know you have this option with Lambda, but then you run into the &quot;cold start&quot; issues on a per resolver basis.<p>Other than that, it seems like a great stack. It&#x27;s scalable and has all the right features baked in to build a prod-ready app. I feel really productive when I&#x27;m using it.<p>After seeing Cloudflare&#x27;s superior performance with their service workers at the edge (over AWS Lambda), and seeing both AppSync and Prisma and Apollo, I&#x27;m wondering if we couldn&#x27;t get a stack like:<p>1) Service workers at the edge, globally distributed JS running in V8 isolates, that work as GraphQL resolvers against a globally distributed DB like Cosmos on Azure. 2) Built-in websockets&#x2F;subscriber support either handled at the edge or from AWS&#x2F;Azure&#x2F;etc 3) Global caching via Apollo Engine 4) A cleaner DB abstraction like Prisma offers over Postgres<p>^^ seems to me like we&#x27;re getting close to this realization of being able to just ship serverless code, have it automatically geo-replicated and cached for low latency, quick response times, and without having to worry about dev ops. These are huge productivity wins for devs.
评论 #17551743 未加载
评论 #17551502 未加载
joelmbellalmost 7 years ago
I&#x27;ve been using AppSync on an iOS project for the past few months. Really loving it so far. Not only does it enable a serverless GraphQL API, but it also makes it super easy to implement offline-first functionality and data syncing
leetbulbalmost 7 years ago
This is great! Thanks! I&#x27;ve built few GraphQL API&#x27;s with Serverless and have always wondered if AppSync was the best way to handle Subscriptions, and have also never seen a decent implementation like this.
chaz6almost 7 years ago
I hope this is not a silly question, but does the schema in step 2 need to be saved to a file somewhere?
评论 #17551157 未加载