A notification service provides the facility of texting or messaging several persons at the same time. For example, if a doctor needs to inform his patients about the clinic remaining closed, or about a substitute who will be sitting in for him he can do so by using a notification service. Push messaging is a service that uses internet protocol to provide information to clients who have requested it. For example, a client may request for news on a specific issue. Whenever new information is available, the information is “pushed” to the client. The two services are different in usage as well as technology. The Amazon SNS provides a cloud-based service that serves the dual purpose of messaging as well as push messaging on mobile devices.
Features of Amazon SNS
Amazon SNS is a simple, cost-effective, and fully managed service by Amazon. The main features of the service or in other words what this service can do for you are:
How does Amazon SNS Work?
The first step is to get yourself registered for the service. This is a routine procedure involving mobile verification using a PIN number. Once you are registered you can use the service for receiving information about certain products or services that you may have subscribed for, or you may provide information about your product or service to those users who have subscribed to it. What this means is that you have to be a registered subscriber to use the service. Basically there are two types of users of the service – the publishers and the subscribers or producers and consumers. Publishers publish information on SNS and clients subscribe to receive information on topics of interest to them. The publishers and the subscribers are not necessarily in sync.
Publishers or owners can create topics to which the consumers subscribe. The publishers can grant or delete permissions, make modifications, set attributes for a topic, or delete a topic. They can also view a list of topics or the subscriptions for a particular topic. Subscribers can subscribe to a topic and view a list of subscriptions made by them.
There is no single protocol for publishing or receiving information. Information can be sent from or received on mobile devices like tablets and smart phones using email, web services, Short Message Service (SMS) or Amazon SQS. As a client, you have to configure the push notification service application to receive notifications from Amazon SNS. Some of the supported services are:
The architecture of some of these services like APNS and GCM is based on the token system. When an application on a device registers for the service, the server returns a token for that device. The token is used to communicate with the device in question. When registering with Amazon SNS, the service credentials provided by the user are used to push notifications on a subscribed topic to the mobile device.
Best Practices to Manage Apps on Amazon SNS
From a developer’s point of view, it is important to understand how to manage the applications you write for Amazon SNS. Amazon manages the tokens on behalf of its clients. When a publisher publishes to a device, it must have the client’s credentials and the device token. A device token or simply token identifies a specific device with a specific app that runs on the device. This identification must be accessible to the publisher in order to publish information on a device. When a user registers his device on Amazon SNS, the unique token number is recorded. This token is combined with some other data and used to publish information on the user’s device. The token along with additional data for publishing is called a PlatformEndpoint. Thus, Amazon connects users to the information they seek and users pay only for the information they get.
Amazon SNS is a fairly inexpensive service since there is no minimum subscription. It is a pay-as-you-go service with very low prices for SNS, HTTP, SMS and Email. Some may consider the last two options expensive by comparison, however, they are cheap in the grand scheme of things. Amazon also offers a Free Tier under which the first 100,000 notifications are free via SMS and the first 1000 are free via Email and the first 1 million requests are free of cost. There are no start-up costs and you have the facility to automatically charge the amount to your credit card.
All in all, Amazon SNS is a great service provided by Amazon. It is a fast, easy-to-use and highly flexible service that allows users to publish information and also receive information on topics of interest to them. One issue not discussed here is privacy and security. Amazon comes with the standard privacy agreement and declaration that any information will not be misused. However, being a cloud-based service, the security issues of cloud computing are inherent and must be guarded against. The service comes with all the features of cloud computing namely flexibility, scalability, and speed. The concerns or drawbacks of cloud computing are also inherent. These are mainly privacy and security. Like with any cloud-based service, if your data is sensitive or highly confidential, it is best kept off the cloud. That said, Amazon SNS is a great service for transferring information among users.
Image courtesy : Amazon