A microservice-based architecture is illustrated in the following diagram, representing a real-time voting application, where small microservices process and consolidate user votes. The voting application collects individual user votes from each mobile device and stores all the votes in a NoSQL-based Amazon DynamoDB database. Finally, there is application logic in the AWS Lambda function, which aggregates all of the voting data cast by users to their favorite actor and returns the final results:
Microservice-based real-time voting application architecture
In the preceding architecture, the following things are happening:
- Users text a vote to a phone number or shortcode provided by a third party such as Twilio.
- The third party is configured to send the content of the message to an endpoint created by Amazon API Gateway, which then forwards the response to a function built in AWS Lambda.
- This function extracts the vote from the message...