Front-End Web & Mobile

AWS AppSync real-time reference architecture

* This article was written by Ed Lima, Solutions Architect at AWS.

Mobile and web applications need to provide engaging and collaborative experiences to users, and real-time access to data is essential. Real-time technologies enable users to receive information as it happens. Use cases such as live scores, second screen, chat applications, dashboards, all sorts of collaborative applications, and many more wouldn’t be possible without bidirectional communication technologies such as the WebSocket protocol.

As your application and user base grows, implementing a real-time backend at scale becomes a complex problem to solve. You have to solve the problem of how to manage live connections, fan-out capabilities, and seamless performance as the number of connected clients increase. What if you could build and deploy scalable real-time applications without worrying about backend servers, connection management, high availability, and reliability? Also, what if you could take advantage of a highly optimized and robust GraphQL data layer to deliver your application data to your front-end app users? This would enable you to spend more time focusing on your business logic?

AWS AppSync is a GraphQL serverless backend for mobile, web, and enterprise applications. It provides a flexible, smart, and reliable data layer to access multiple data sources in your AWS account. AWS AppSync takes advantage of GraphQL subscriptions to perform real-time operations by pushing data to clients that choose to listen to specific events from the backend. This means that you can easily and effortlessly make any supported data source in AWS AppSync real time. The connection management is handled automatically by the AWS AppSync client SDK or AWS Amplify client using WebSocket as the network protocol between the client and service:

AWS AppSync takes care of the undifferentiated heavy lifting of managing your real-time backend infrastructure. However, it’s important that your application is well architected and designed in order to provide the best experience possible to your end users. For that reason, today we’re publishing our first AWS AppSync real-time reference architecture. It includes sample code that helps you understand and apply best practices to your next collaborative real-time application development project.

For a detailed explanation of how all the serverless parts of the puzzle fit together to perform different types of real-time use cases (one-to-many and/or many-to-many), as well as the GitHub repository where you can try the code yourself, see related article on OPENGraphQL.