
AWS AppSync – Build data-driven apps with real-time and offline capabilities - nbrempel
https://aws.amazon.com/appsync/
======
dang
[https://news.ycombinator.com/item?id=15801229](https://news.ycombinator.com/item?id=15801229)

------
abalone
I.e. AWS’s take on Firebase, built on AWS primitives.

This has been out for a few months now. Any experiences with it?

~~~
codyswann
I'm leading development on a React Native app using AppSync.

So far it's amazing.

It leverages Apollo for offline/GraphQL capabilities and Apache VTL to bind
resources.

It also integrates really nicely with AWS Amplify.

One thing that was a bit of an annoyance was access levels.

You can authenticate with the GraphQL api using a Key, IAM or Cognito JWT

Key is for development only.

IAM does not expose Cognito Groups to VTL

JWT requires an active session.

So we had to create a "fake" account for non-signed in access.

Use case being, a "guest" can read data from the API but only "admins" can
write data to the API

~~~
k__
I had the impression Cognito had this feature, but maybe I'm thinking of Auth0
here

------
neom
Pardon my ignorance, this is the AWS answer to Firebase?

~~~
itake
I don't think Firebase supports GraphQL or Apollo?

~~~
jkarneges
Regardless of protocol/software used, I think it could still be called an
answer to Firebase, since AppSync and Firebase are both "backend-as-a-service"
systems with realtime updates, useful for rapid app development.

------
EGreg
Seems like another way to lock you into a proprietary cloud (Firebase or AWS
backend).

Why not just take a client side library and an open-source backend, and host
it on EC2 or some general purpose computer server hosted anywhere? This way
your CLIENTS have a choice too.

If you can install Wordpress why not this?

SAFE network will solve all this soon.

~~~
k__
I think the lock-in can be rather small if you consider the flexibility of
GraphQL.

~~~
cjoelrun
Having used graph.cool I can say there's a significant amount of lock-in.
Authorization can be pretty specific to the implementation and often impacts
your schema. Secondly the extensions that have a lot of the logic are
implemented differently every time. AppSync uses Apache Velocity Template
Language (VTL), seems like a huge lock-in there. Don't be fooled by the
GraphQL sticker, there's a significant amount of lock-in if you go with any of
the SaaS(BaaS) products.

------
ggregoire
I wonder why most companies building simple CRUD apps still don't use those
services (AppSync, Firebase, Graphcool, etc)? Seems like cheaper than hiring a
backend developer + a devops.

~~~
mewwts
I can only speak about Firebase, but it gets very expensive very quickly.

~~~
subpixel
Will Graphcool be around in a couple years? That's my first consideration in
selecting tools like this to build a business on.

------
wehadfun
So basically it is a database in the cloud that you can access using GraphQL
over HTTP?

~~~
abalone
Plus real-time sync and offline capabilities. And I think some search and
access control features.

~~~
nslog
Yup:
[https://docs.aws.amazon.com/appsync/latest/devguide/security...](https://docs.aws.amazon.com/appsync/latest/devguide/security.html)
[https://docs.aws.amazon.com/appsync/latest/devguide/tutorial...](https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-
elasticsearch-resolvers.html)

------
jchrisa
Does it support peer-to-peer connections among edge devices?

------
philosopherlawr
If only this had offline support for non-NodeJS GraphQL

~~~
nslog
It does - you can do offline with Android and iOS too:
[https://docs.aws.amazon.com/appsync/latest/devguide/building...](https://docs.aws.amazon.com/appsync/latest/devguide/building-
a-client-app.html)

~~~
k__
With Expo/react-native-web, aws-amplify, and apollo-client, apollo-link-state
this is a complete cross platform solution

------
cpr
Semi-on-topic, are there others providing GraphQL backends in the cloud, other
than cloud.graph.cool and AWS?

------
fredliu
How/Does it handle push notifications to iOS/Android/Web? Similar to Firebase?

~~~
k__
As far as I know GraphQL has subscriptions

~~~
ryanmarsh
AppSync supports graphql subscriptions on mutations. They’re delivered using
to the browser using MQTT.

~~~
fredliu
ah, thanks, that's what i wanted to ask. Since it's MQTT, how does it support
iOS when the app is in the background? or it won't support that scenario on
iOS? On Android, does it also use MQTT to maintain a connection? instead of
using FCM/GCM? On the browser, how's the MQTT connection maintained? does it
have service worker support for "offline" use cases?

~~~
ryanmarsh
I haven’t been able to ascertain that from the docs. There could be different
transports for web and iOS. All I know is web uses MQTT over web sockets and
the Apollo library is used for offline and cache support.

