Stay Connected with Application Integration
After completing this unit, you’ll be able to:
- Describe the features and benefits of Amazon Simple Notification Service (Amazon SNS).
- Describe the features and benefits of Amazon Simple Queue Service (Amazon SQS).
Suppose you manage an inventory tracking system that tracks products stocked in a warehouse for an online store. Whenever the stock is close to being depleted, the purchasing system must place an order for more items. Whenever the stock is sold out, the website must stop offering that product. One way to make this happen is for both systems to regularly query the inventory system to learn about these changes, which takes a lot of effort, time, and resources to maintain each individual integration.
Alternatively, you can use AWS application integration services to have the inventory system publish notifications about stock changes and route these notifications to the right systems at the right time so that they can make the appropriate changes automatically.
What Is Application Integration?
Application integration is a sound design principle for building a system that is broken up into small, loosely coupled components. This means that they work independently so that a change or failure in one component should not cause other components to fail. That said, a system made of many small components requires integration services in order for them to work together.
AWS offers a suite of services that integrates with nearly every application to help you build scalable and resilient solutions. This unit focuses on two of those services: Amazon Simple Notification Service and Amazon Simple Queue Service.
Amazon Simple Notification Service
Amazon Simple Notification Service (Amazon SNS) enables message filtering and distribution on a large scale. Think about Amazon SNS as a way for systems to talk with one another, as well as their users. These systems might include serverless functions, queues, and distributed systems. Additionally, Amazon SNS fans out notifications to users through mobile push messages, text messages, and email.
How Amazon SNS Works
An Amazon SNS topic is like a broadcasting station. You can publish messages to a topic, and anyone interested in these messages can subscribe. The software that broadcasts topics is called a topic publisher and the software or person that subscribes to broadcasts is called a topic subscriber.
Amazon SNS message filtering then ensures that subscribers receive only the messages that interest them.
Keep Data Secure with Amazon SNS
There are several ways to keep sensitive Amazon SNS data secure.
- Set topic policies that restrict who can publish and subscribe to a specific topic.
- Encrypt data in transit with Amazon Trust Services certificates, supporting Amazon SNS HTTPS API.
- Use AWS Key Management Service keys to encrypt data at rest.
- Use AWS PrivateLink to privately publish messages to Amazon SNS topics from your Amazon VPC subnets without traversing the public internet.
Here are some use cases for messaging.
- You have two services or systems that need to communicate with each other, such as the front end and back end of a website.
- You have a service that has to track a backlog of actions to be executed, like a hotel booking system that takes cancellation messages from a queue and performs the cancellations without the customer having to wait.
- You have one service that manages resources and other services that receive updates about changes to those resources, such as the inventory system, purchasing system, and online store that we discussed in the beginning of this unit.
Amazon Simple Queue Service
Amazon Simple Queue Service (Amazon SQS) is a fully managed message queue that can send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available. You can use Amazon SQS for asynchronous integration of components that may not all process the same amount of work simultaneously.
For example, suppose that one of your services sends a burst of information every hour on the hour but is largely dormant between bursts. Another system continuously consumes information but isn’t able to ingest all of the burst information at once. Amazon SQS captures all of the first service’s burst information, and then feeds that data to the second service as it is able to process it throughout the hour.
Amazon SQS offers two types of message queues.
- Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery.
- First-in, first-out (FIFO) queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.
In the next unit, we dive into management services with AWS CloudFormation and AWS Trusted Advisor.