Learn how to use AWS AppSync and WebSockets to deliver real-time updates and improve user experience. Discover how this approach can enhance user engagement in applications like blog posts and comment sections.
Table of Contents
Question
A company hosts a blog post application on AWS using Amazon API Gateway, Amazon DynamoDB, and AWS Lambda. The application currently does not use API keys to authorize requests. The API model is as follows:
GET /posts/{postId}: to get post details
GET /users/{userId}: to get user details
GET /comments/{commentId}: to get comments details
The company has noticed users are actively discussing topics in the comments section, and the company wants to increase user engagement by making the comments appear in real time.
Which design should be used to reduce comment latency and improve user experience?
A. Use edge-optimized API with Amazon CloudFront to cache API responses.
B. Modify the blog application code to request GET/comments/{commentId} every 10 seconds.
C. Use AWS AppSync and leverage WebSockets to deliver comments.
D. Change the concurrency limit of the Lambda functions to lower the API response time.
Answer
C. Use AWS AppSync and leverage WebSockets to deliver comments.
Explanation
The solution that the solutions architect should recommend to meet these requirements is Option C.
This option suggests using AWS AppSync and leveraging WebSockets to deliver comments. AWS AppSync is a fully managed service that makes it easy to develop GraphQL APIs by handling the heavy lifting of securely connecting to data sources like AWS DynamoDB, Lambda, or any HTTP data source.
WebSockets provide a persistent connection between a client and server that both parties can use to start sending data at any time. This allows for real-time updates, which is ideal for displaying comments in real time and increasing user engagement.
Amazon AWS Certified Solutions Architect – Professional SAP-C02 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Solutions Architect – Professional SAP-C02 exam and earn Amazon AWS Certified Solutions Architect – Professional SAP-C02 certification.