Logo

dev-resources.site

for different kinds of informations.

SNS vs SQS? AWS Messaging Services - Know the difference

Published at
5/14/2019
Categories
aws
beginners
architect
career
Author
andrewbrown
Categories
4 categories in total
aws
open
beginners
open
architect
open
career
open
Author
11 person written this
andrewbrown
open
SNS vs SQS? AWS Messaging Services - Know the difference

I noticed Helen released this good DEV.to post on SNS and SQS and I happen to have a video of the same nature lying around and thought I'd upload it to provide an explanation from a different perspective.

A little bit more about Message Services

The 4 most important services you need to know when it comes to Application Integration are the following:

  • SNS - PubSub (think pass along)
  • SQS - Queueing (think batch)
  • Kinesis - Real-time
  • SWF - Queuing but with people

For the Solution Architect Associate and Certificated Cloud Practitioner you really need to know the difference between SNS and SQS.

MKS - Amazon Managed Streaming for Kafka

Most companies in BigData who want to use real-time messaging systems tend to use Kafka. Luckily AWS has a managed service called MKS (Managed Kafka Service).

Kinesis

The use case for Kinesis has been really good for gaming where you need a simple streaming queue. There is a Solutions Architect Professional exam question which asks how you would ingest millions of events from IoT game devices to then insert into a database such as DynamoDB to update a scoreboard, and so Kinesis is what you would keep in mind.

At ExamPro we built our own real-time event tracking (think GoogleAnalytics) so we can accurately track and improve how people learn on our platform.

SNS - Amazon Simple Notification Service

SNS is commonly used for sending simple internal emails. So for example when someone sign-ups on ExamPro I use the AWS SDK to send a message to an SNS topic which then sends me a plain text email.

Another way we use SNS is to trigger webhooks in your application. So for example, let us say you have a web-app which needs to extract data out of a PDF so you need to use a PDFTK which you have to run in a custom runtime in a Lambda function because of legacy reasons. When that lambda has processed that pdf you want to notify your web-app to tell the user it's done. You can have Lambda tell SNS which will then send an HTTP request to an api endpoint (webhook) to your web-app which will then update the user that the pdf has finished processing.

SQS - Amazon Simple Queue Service

When we send out an email such as confirmation or reset password on ExamPro we use SQS to decouple email sending from our app so it doesn't cause the app to hang. ExamPro is a Rails app and so this gem called Shoryuken makes it really easy to start working with SQS will little knowledge.

GitHub logo ruby-shoryuken / shoryuken

A super efficient Amazon SQS thread based message processor for Ruby

I'm looking for Shoryuken maintainers, are you interested on helping to maintain Shoryuken? Join our Slack

Shoryuken

Shoryuken

Shoryuken sho-ryu-ken is a super-efficient Amazon SQS thread-based message processor.

Build Status

Key features

Requirements

Ruby 2.4 or greater.

Installation

Add this line to your application's Gemfile:

gem 'shoryuken'
Enter fullscreen mode Exit fullscreen mode

If you are using AWS SDK version 3, please also add this line:

gem 'aws-sdk-sqs'
Enter fullscreen mode Exit fullscreen mode

The extra gem aws-sdk-sqs is required in order to keep Shoryuken compatible with AWS SDK version 2 and 3.

And then execute:

$ bundle
Enter fullscreen mode Exit fullscreen mode

Usage

Check the Getting Started page.

More Information

For more information check the wiki page.

Credits

Mike Perham, creator of Sidekiq, and everybody who contributed to it. Shoryuken wouldn't exist as it is without those…

SWF

Nobody I know uses this service. It's used by AWS I believe to help coordinate a sequence of tasks with people and services which makes sense for Amazon when they need to have humans put things into boxes and then ship those boxes.

There isn't even a new AWS icon. I've never been able to figure out how to access this service. It shows up on exams.

Help me out make more free content

If you like this kind of AWS content the way you can help me out is adding me to Linked In and endorsing my skill for AWS. You should add me anyway I love connecting with people on DEV.to

architect Article's
30 articles in total
Favicon
Top Architect and Structural Engineer for Custom Designs
Favicon
Similarities of a startup and museum of art. The role of an architect.
Favicon
Exploring the Intersection of CAD Designing and Artificial Intelligence
Favicon
Enhancing Negotiation and Presentation Skills for Enterprise Architects
Favicon
Software Architect
Favicon
The Power of Practicality: How Hands-On Coding Enhances Architectural Decision-Making
Favicon
Making the leap to AWS with Architect
Favicon
Interview with Solutions Architect
Favicon
Que es ser Arquitecto de soluciones y por que certificarse como AWS Solutions Architect?
Favicon
Introduction to Enterprise Architecture (EA)
Favicon
Tales from the Real World - Architecting the Transformation
Favicon
Creating successful high-level software solutions
Favicon
Microsoft Azure Architect Technologies AZ 303 Introduction
Favicon
A First Look at Architect
Favicon
AWS IAM User
Favicon
Serverless dependency management in OpenJS Architect
Favicon
Serverless OAuth com Múltiplos Provedores
Favicon
AZ-303 Azure Architect Technologies - Introduction
Favicon
AZ-303 Azure Active Directory [Module 1]
Favicon
Serverless GitHub OAuth with OpenJS Architect and Begin - Part 2
Favicon
Strangler except serverless with OpenJS Architect
Favicon
Express style API with OpenJS Architect
Favicon
Using Tailwind with Begin.com and Architect
Favicon
Connect an Architect App to a Cloudflare Domain
Favicon
Top 10 takeaways from "How to become an aspiring architect" meetup
Favicon
AWS Solutions Architect Associate
Favicon
SNS vs SQS? AWS Messaging Services - Know the difference
Favicon
How not to architect your project? 
Favicon
Thoughts on Software Architecture
Favicon
5 things I wish I knew before using CloudFormation to build a CodePipeline for Lambda Functions

Featured ones: