SlideShare a Scribd company logo
Ch7. Integrating
Application Services
Contents
• SQS
• SNS
• Cognito
• API Gateway
• WebSockets in AWS
1. SQS (Simple Queue Service)
The problem of delivering a
letter
• Failed to find the recipient in time.

• lose the letter in the process.
Messaging services
• An intermediary that has the main responsibility of
delivering the message and guaranteeing the delivery.

• These systems are designed to provide a communication
buffer between distributed components.

• producers (senders) -> broker (queues) -> receivers
SQS
• Simple Queue Service (SQS,訊息佇列列服務)
Asynchrony
• send-and-forget (fire-and-forget) & store and forward (儲
存與轉發) approach.

• Can be used for batch processing (批次處理理) and
coordinating message processing in different schedules.

SQS can also be used for batch processing and coordinating message processing in
different schedules.
SQS
• SQS is designed with high scalability, availability, and
reliability.

• this service is vendor neutral.

• This service availability is achieved by storing every
received message in multiple availability zones.

• Allows multiple producers on the same queue and
multiple consumers on the same queue.
Security
• Transport Level Security (TLS)

• Encrypted with a unique cryptographic key

• IAM
Security - Encryption
Durability(持續性)
• Default: 4 days.

• Range: 1 minutes ~ 14 days
Multiple AZs & Weighted
Random Distribution
Queue Types
• Standard Queues:

• Unlimited Throughput

• At-Least-Once Delivery

• Best-Effort Ordering. (盡⼒力力按順序傳遞)

• FIFO Queues:

• High Throughput,

• Exactly-Once Processing

• First-In-First-Out Delivery.
Polling (輪輪詢)
• The way SQS retrieves messages depends on factors
such as the message volume (greater than 1,000) and the
polling (pooling) configuration specified at the message or
the queue level.

• Amazon SQS provides 2 kinds of polling to receive
messages from a queue:

• Short Polling (default)

• Long Polling
Short Polling (短輪輪詢)
• The ReceiveMessage request queries only a subset of
the servers (weighted random distribution) to find
messages that are available to include in the response.

• Amazon SQS sends the response right away, even if the
query found no messages.
Long Polling (長輪輪詢)
• The ReceiveMessage request queries all of the servers for
messages.

• Amazon SQS sends the response after it collects the
maximum number of messages for the response, or when
the ReceiveMessage polling wait time expires.

• Benefits:

• Minimize CPU client cycles and diminishing costs,
avoiding unnecessary requests to the service API.
Messaging patterns
• Queuing chain pattern(佇列列鏈表模式):

• Problem to Be Solved:

• A tendency for performance bottlenecks to result from
having the systems tightly linked to each other.

• Hard to recover when there has been a failure.

• Solution:

• Loosely coupling the systems by between systems using
queues, and then exchanging messages that transfer jobs.
• image source: http://en.clouddesignpattern.org/index.php/CDP:Queuing_Chain_Pattern
Messaging patterns
• Benefits:

• Use asynchronous processing to return responses
quickly.

• Structure the system through loose coupling of simple
processes.

• You can increase or decrease the number of instances.

• Robust to failure.
Messaging patterns
• Job observer Pattern:

• Problem to Be Solved:

• Unanticipatedly large load on the batch system.

• Solution:

• Use tool such as CloudWatch to monitor the volume
of job requests (the number of SQS messages), so
that the batch servers can be added or deleted
automatically as required.
• image source: http://en.clouddesignpattern.org/index.php/CDP:Job_Observer_Pattern
Messaging patterns
• Priority queue pattern:

• Problem:

• There are cases where a large number of batch jobs
may need processing, and where the the jobs may
need to be re-prioritized.

• Solution:

• A queue is used in controlling batch jobs. The queue
need only be provided with priority numbers. 
• source image: http://en.clouddesignpattern.org/index.php/CDP:Priority_Queue_Pattern
2. SNS (Simple Notification Service)
SNS
• Simple Notification Service (SNS) 

• A messaging service designed to work with publisher/
subscriber semantics by decoupling distributed system
components using an event model based on
asynchronous push messaging.

• Message:

• payload (can be encrypted) and attributes 

• Maximum limit of 256 KB
SNS
• Publisher:

• Produce and send a message to a topic.

• Topic:

• A logical access point and communication channel.

• Subscribers:

• Consume or receive the message or notification over
one of the supported protocols (e.g. SNS) when they
are subscribed to the topic.
SNS
• 1 to N (one to many)
image source:https://aws.amazon.com/pub-sub-messaging/
SNS
• Messages will be delivered to all the channel's
subscribers, and subscribers who arrive late will lose their
sent messages.

• This kind of messaging is excellent for orchestrating
communications between micro services, and every
listening party chooses to process the message of drop it.

• Once a message has been sent, it cannot be sent again.
SNS
• Fanout (the number of inputs that can be connected to a
specified output) 廣播模式:

• A single published message can be copied on to
multiple destinations
SNS
3. Cognito
Cognito
• Amazon Cognito provides authentication (認證),
authorization (授權), and user management for your web
and mobile apps.

• Your users can sign in directly with a user name and
password, or through a third party such as Facebook,
Amazon, Google or Apple.
Cognito
• Federation Identity (⾝身分識別聯聯盟):

• Use existing credentials in multiple authentication facades

• 1. Cognito user pools:

• A serverless managed database that you can use to
authenticate your web and mobile apps.

• 2. Cognito identity pools:

• Enable you to grant your users access to other AWS services.
You can use identity pools and user pools separately or
together.
Cognito
• Cognito user pools:

• Signing up and signing in

• Updating the user profile data via standard and custom
attributes

• Forgot password by providing challenges

• Token-based authentication for JSON Web Tokens
(JWTs)

• Email and SMS two-factor verification
Cognito
• image source: https://www.notsosecure.com/hacking-
aws-cognito-misconfigurations/
4. API Gateway
API Gateway
• A service facade for RESTFul applications, the REST
architectural approach that integrates via web services.

• The API exposes a series of resources in a stateless
manner, and applications interact

with verbs (GET, POST, PUSH, DELETE), indicating the
server operation to be done.
API Gateway
API Gateway
API Gateway
• The endpoint can be configured with the following
scopes:
API Gateway
• The integration request can be made with one of the
following:

• Lambda function

• HTTP

• Mock

• AWS service

• VPC Link
5. WebSockets in AWS
WebSocket
• Provide bi-directional communication between the client and the
server to reach real-time applications:

• AWS IoT:

• A service designed to connect objects to the IoT via the SDK;
you can use the WebSockets via MQTT to push messages
back to the client.

• AWS AppSync:

• Supports the WebSockets protocol, and it can push
messages published to subscribers listening to specific
topics.
Resources
• 程式設計冪等設計:資料最終⼀一致性的保證

• Amazon SQS Queue Types

• Amazon SQS short and long polling

• CDP:Queuing Chain Pattern

• CDP:Job Observer Pattern

• What Is Amazon Cognito?

• WS-Federation⼆二三事
Thank You

More Related Content

What's hot

AWS ELB
AWS ELBAWS ELB
AWS ELB
Mahesh Raj
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 Fundamentals
Piyush Agrawal
 
Unit1 dbms
Unit1 dbmsUnit1 dbms
Unit1 dbms
gowrivageesan87
 
How to Set Up ApsaraDB for RDS on Alibaba Cloud
How to Set Up ApsaraDB for RDS on Alibaba CloudHow to Set Up ApsaraDB for RDS on Alibaba Cloud
How to Set Up ApsaraDB for RDS on Alibaba Cloud
Alibaba Cloud
 
AWS Data migration services
AWS Data migration servicesAWS Data migration services
AWS Data migration services
Arun Sirimalla
 
Migration to Alibaba Cloud
Migration to Alibaba CloudMigration to Alibaba Cloud
Migration to Alibaba Cloud
Alibaba Cloud
 
Launch and Scale Your E-commerce Website with Magento
Launch and Scale Your E-commerce Website with MagentoLaunch and Scale Your E-commerce Website with Magento
Launch and Scale Your E-commerce Website with Magento
Alibaba Cloud
 
Bigdata meetup dwarak_realtime_score_app
Bigdata meetup dwarak_realtime_score_appBigdata meetup dwarak_realtime_score_app
Bigdata meetup dwarak_realtime_score_app
Dwarakanath Ramachandran
 
Big Data Quickstart Series 3: Perform Data Integration
Big Data Quickstart Series 3: Perform Data IntegrationBig Data Quickstart Series 3: Perform Data Integration
Big Data Quickstart Series 3: Perform Data Integration
Alibaba Cloud
 
Getting Started with EC2, S3 and EMR
Getting Started with EC2, S3 and EMRGetting Started with EC2, S3 and EMR
Getting Started with EC2, S3 and EMR
Arun Sirimalla
 
AWS Webcast - Library Systems on the AWS Cloud
AWS Webcast - Library Systems on the AWS CloudAWS Webcast - Library Systems on the AWS Cloud
AWS Webcast - Library Systems on the AWS Cloud
Amazon Web Services
 
Leveraging ApsaraDB to Deploy Business Data on the Cloud
Leveraging ApsaraDB to Deploy Business Data on the CloudLeveraging ApsaraDB to Deploy Business Data on the Cloud
Leveraging ApsaraDB to Deploy Business Data on the Cloud
Oliver Theobald
 
Deep Dive on EC2 and S3
Deep Dive on EC2 and S3Deep Dive on EC2 and S3
Deep Dive on EC2 and S3
Arun Sirimalla
 
IBM Cloud PowerVS - AIX and IBM i on Cloud
IBM Cloud PowerVS - AIX and IBM i on CloudIBM Cloud PowerVS - AIX and IBM i on Cloud
IBM Cloud PowerVS - AIX and IBM i on Cloud
Nagesh Ramamoorthy
 
Messaging in the cloud - Azure Service Bus
Messaging in the cloud - Azure Service BusMessaging in the cloud - Azure Service Bus
Messaging in the cloud - Azure Service Bus
Sean Feldman
 
AWS network services
AWS network servicesAWS network services
AWS network services
Nagesh Ramamoorthy
 
Microservices - modern software architecture
Microservices - modern software architectureMicroservices - modern software architecture
Microservices - modern software architecture
Bilguun Bayarmagnai
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
Ramakrishna kapa
 
Getting started with S3
Getting started with S3Getting started with S3
Getting started with S3
AWS UG PK
 
Responding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database TechnologyResponding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database Technology
Alibaba Cloud
 

What's hot (20)

AWS ELB
AWS ELBAWS ELB
AWS ELB
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 Fundamentals
 
Unit1 dbms
Unit1 dbmsUnit1 dbms
Unit1 dbms
 
How to Set Up ApsaraDB for RDS on Alibaba Cloud
How to Set Up ApsaraDB for RDS on Alibaba CloudHow to Set Up ApsaraDB for RDS on Alibaba Cloud
How to Set Up ApsaraDB for RDS on Alibaba Cloud
 
AWS Data migration services
AWS Data migration servicesAWS Data migration services
AWS Data migration services
 
Migration to Alibaba Cloud
Migration to Alibaba CloudMigration to Alibaba Cloud
Migration to Alibaba Cloud
 
Launch and Scale Your E-commerce Website with Magento
Launch and Scale Your E-commerce Website with MagentoLaunch and Scale Your E-commerce Website with Magento
Launch and Scale Your E-commerce Website with Magento
 
Bigdata meetup dwarak_realtime_score_app
Bigdata meetup dwarak_realtime_score_appBigdata meetup dwarak_realtime_score_app
Bigdata meetup dwarak_realtime_score_app
 
Big Data Quickstart Series 3: Perform Data Integration
Big Data Quickstart Series 3: Perform Data IntegrationBig Data Quickstart Series 3: Perform Data Integration
Big Data Quickstart Series 3: Perform Data Integration
 
Getting Started with EC2, S3 and EMR
Getting Started with EC2, S3 and EMRGetting Started with EC2, S3 and EMR
Getting Started with EC2, S3 and EMR
 
AWS Webcast - Library Systems on the AWS Cloud
AWS Webcast - Library Systems on the AWS CloudAWS Webcast - Library Systems on the AWS Cloud
AWS Webcast - Library Systems on the AWS Cloud
 
Leveraging ApsaraDB to Deploy Business Data on the Cloud
Leveraging ApsaraDB to Deploy Business Data on the CloudLeveraging ApsaraDB to Deploy Business Data on the Cloud
Leveraging ApsaraDB to Deploy Business Data on the Cloud
 
Deep Dive on EC2 and S3
Deep Dive on EC2 and S3Deep Dive on EC2 and S3
Deep Dive on EC2 and S3
 
IBM Cloud PowerVS - AIX and IBM i on Cloud
IBM Cloud PowerVS - AIX and IBM i on CloudIBM Cloud PowerVS - AIX and IBM i on Cloud
IBM Cloud PowerVS - AIX and IBM i on Cloud
 
Messaging in the cloud - Azure Service Bus
Messaging in the cloud - Azure Service BusMessaging in the cloud - Azure Service Bus
Messaging in the cloud - Azure Service Bus
 
AWS network services
AWS network servicesAWS network services
AWS network services
 
Microservices - modern software architecture
Microservices - modern software architectureMicroservices - modern software architecture
Microservices - modern software architecture
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Getting started with S3
Getting started with S3Getting started with S3
Getting started with S3
 
Responding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database TechnologyResponding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database Technology
 

Similar to AWS Study Group - Chapter 07 - Integrating Application Services [Solution Architect Associate Guide]

Azure Messaging Services #1
Azure Messaging Services #1Azure Messaging Services #1
Azure Messaging Services #1
Azure Riyadh User Group
 
Mq Lecture
Mq LectureMq Lecture
Mq Lecture
barnettj10974
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging System
Shiju Varghese
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Clemens Vasters
 
Ruby Microservices with RabbitMQ
Ruby Microservices with RabbitMQRuby Microservices with RabbitMQ
Ruby Microservices with RabbitMQ
Zoran Majstorovic
 
OSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland HochmuthOSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
NETWAYS
 
OSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland HochmuthOSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
NETWAYS
 
Andes: a Scalable persistent Messaging System
Andes: a Scalable persistent Messaging SystemAndes: a Scalable persistent Messaging System
Andes: a Scalable persistent Messaging System
Srinath Perera
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
Paria Heidari
 
Microservices deck
Microservices deckMicroservices deck
Microservices deck
Raja Chattopadhyay
 
Making communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service BusMaking communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service Bus
Particular Software
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Azure Messaging Services 2
Azure Messaging Services 2Azure Messaging Services 2
Azure Messaging Services 2
Azure Riyadh User Group
 
AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...
AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...
AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...
Amazon Web Services
 
Event-driven architecture with Java technology stack
Event-driven architecture with Java technology stackEvent-driven architecture with Java technology stack
Event-driven architecture with Java technology stack
Anna Shymchenko
 
Community application design for streaming analytics
Community application design for streaming analyticsCommunity application design for streaming analytics
Community application design for streaming analytics
Sandeep Kumar
 
apachekafka-160907180205.pdf
apachekafka-160907180205.pdfapachekafka-160907180205.pdf
apachekafka-160907180205.pdf
TarekHamdi8
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
Srikrishna k
 
Cloud computing Module 2 First Part
Cloud computing Module 2 First PartCloud computing Module 2 First Part
Cloud computing Module 2 First Part
Soumee Maschatak
 
AWS Messaging
AWS MessagingAWS Messaging
AWS Messaging
AWS Riyadh User Group
 

Similar to AWS Study Group - Chapter 07 - Integrating Application Services [Solution Architect Associate Guide] (20)

Azure Messaging Services #1
Azure Messaging Services #1Azure Messaging Services #1
Azure Messaging Services #1
 
Mq Lecture
Mq LectureMq Lecture
Mq Lecture
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging System
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
 
Ruby Microservices with RabbitMQ
Ruby Microservices with RabbitMQRuby Microservices with RabbitMQ
Ruby Microservices with RabbitMQ
 
OSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland HochmuthOSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 - Monasca - Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
 
OSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland HochmuthOSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
OSMC 2016 | Monasca: Monitoring-as-a-Service (at-Scale) by Roland Hochmuth
 
Andes: a Scalable persistent Messaging System
Andes: a Scalable persistent Messaging SystemAndes: a Scalable persistent Messaging System
Andes: a Scalable persistent Messaging System
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
 
Microservices deck
Microservices deckMicroservices deck
Microservices deck
 
Making communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service BusMaking communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service Bus
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Azure Messaging Services 2
Azure Messaging Services 2Azure Messaging Services 2
Azure Messaging Services 2
 
AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...
AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...
AWS re:Invent 2016: Beeswax: Building a Real-Time Streaming Data Platform on ...
 
Event-driven architecture with Java technology stack
Event-driven architecture with Java technology stackEvent-driven architecture with Java technology stack
Event-driven architecture with Java technology stack
 
Community application design for streaming analytics
Community application design for streaming analyticsCommunity application design for streaming analytics
Community application design for streaming analytics
 
apachekafka-160907180205.pdf
apachekafka-160907180205.pdfapachekafka-160907180205.pdf
apachekafka-160907180205.pdf
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Cloud computing Module 2 First Part
Cloud computing Module 2 First PartCloud computing Module 2 First Part
Cloud computing Module 2 First Part
 
AWS Messaging
AWS MessagingAWS Messaging
AWS Messaging
 

Recently uploaded

Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 

Recently uploaded (20)

Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 

AWS Study Group - Chapter 07 - Integrating Application Services [Solution Architect Associate Guide]

  • 2. Contents • SQS • SNS • Cognito • API Gateway • WebSockets in AWS
  • 3. 1. SQS (Simple Queue Service)
  • 4. The problem of delivering a letter • Failed to find the recipient in time. • lose the letter in the process.
  • 5. Messaging services • An intermediary that has the main responsibility of delivering the message and guaranteeing the delivery. • These systems are designed to provide a communication buffer between distributed components. • producers (senders) -> broker (queues) -> receivers
  • 6. SQS • Simple Queue Service (SQS,訊息佇列列服務)
  • 7. Asynchrony • send-and-forget (fire-and-forget) & store and forward (儲 存與轉發) approach. • Can be used for batch processing (批次處理理) and coordinating message processing in different schedules. SQS can also be used for batch processing and coordinating message processing in different schedules.
  • 8. SQS • SQS is designed with high scalability, availability, and reliability. • this service is vendor neutral. • This service availability is achieved by storing every received message in multiple availability zones. • Allows multiple producers on the same queue and multiple consumers on the same queue.
  • 9. Security • Transport Level Security (TLS) • Encrypted with a unique cryptographic key • IAM
  • 11. Durability(持續性) • Default: 4 days. • Range: 1 minutes ~ 14 days
  • 12. Multiple AZs & Weighted Random Distribution
  • 13. Queue Types • Standard Queues: • Unlimited Throughput • At-Least-Once Delivery • Best-Effort Ordering. (盡⼒力力按順序傳遞) • FIFO Queues: • High Throughput, • Exactly-Once Processing • First-In-First-Out Delivery.
  • 14. Polling (輪輪詢) • The way SQS retrieves messages depends on factors such as the message volume (greater than 1,000) and the polling (pooling) configuration specified at the message or the queue level. • Amazon SQS provides 2 kinds of polling to receive messages from a queue: • Short Polling (default) • Long Polling
  • 15. Short Polling (短輪輪詢) • The ReceiveMessage request queries only a subset of the servers (weighted random distribution) to find messages that are available to include in the response. • Amazon SQS sends the response right away, even if the query found no messages.
  • 16. Long Polling (長輪輪詢) • The ReceiveMessage request queries all of the servers for messages. • Amazon SQS sends the response after it collects the maximum number of messages for the response, or when the ReceiveMessage polling wait time expires. • Benefits: • Minimize CPU client cycles and diminishing costs, avoiding unnecessary requests to the service API.
  • 17. Messaging patterns • Queuing chain pattern(佇列列鏈表模式): • Problem to Be Solved: • A tendency for performance bottlenecks to result from having the systems tightly linked to each other. • Hard to recover when there has been a failure. • Solution: • Loosely coupling the systems by between systems using queues, and then exchanging messages that transfer jobs.
  • 18. • image source: http://en.clouddesignpattern.org/index.php/CDP:Queuing_Chain_Pattern
  • 19. Messaging patterns • Benefits: • Use asynchronous processing to return responses quickly. • Structure the system through loose coupling of simple processes. • You can increase or decrease the number of instances. • Robust to failure.
  • 20. Messaging patterns • Job observer Pattern: • Problem to Be Solved: • Unanticipatedly large load on the batch system. • Solution: • Use tool such as CloudWatch to monitor the volume of job requests (the number of SQS messages), so that the batch servers can be added or deleted automatically as required.
  • 21. • image source: http://en.clouddesignpattern.org/index.php/CDP:Job_Observer_Pattern
  • 22. Messaging patterns • Priority queue pattern: • Problem: • There are cases where a large number of batch jobs may need processing, and where the the jobs may need to be re-prioritized. • Solution: • A queue is used in controlling batch jobs. The queue need only be provided with priority numbers. 
  • 23. • source image: http://en.clouddesignpattern.org/index.php/CDP:Priority_Queue_Pattern
  • 24. 2. SNS (Simple Notification Service)
  • 25. SNS • Simple Notification Service (SNS) • A messaging service designed to work with publisher/ subscriber semantics by decoupling distributed system components using an event model based on asynchronous push messaging. • Message: • payload (can be encrypted) and attributes • Maximum limit of 256 KB
  • 26. SNS • Publisher: • Produce and send a message to a topic. • Topic: • A logical access point and communication channel. • Subscribers: • Consume or receive the message or notification over one of the supported protocols (e.g. SNS) when they are subscribed to the topic.
  • 27. SNS • 1 to N (one to many) image source:https://aws.amazon.com/pub-sub-messaging/
  • 28. SNS • Messages will be delivered to all the channel's subscribers, and subscribers who arrive late will lose their sent messages. • This kind of messaging is excellent for orchestrating communications between micro services, and every listening party chooses to process the message of drop it. • Once a message has been sent, it cannot be sent again.
  • 29. SNS • Fanout (the number of inputs that can be connected to a specified output) 廣播模式: • A single published message can be copied on to multiple destinations
  • 30. SNS
  • 32. Cognito • Amazon Cognito provides authentication (認證), authorization (授權), and user management for your web and mobile apps. • Your users can sign in directly with a user name and password, or through a third party such as Facebook, Amazon, Google or Apple.
  • 33. Cognito • Federation Identity (⾝身分識別聯聯盟): • Use existing credentials in multiple authentication facades • 1. Cognito user pools: • A serverless managed database that you can use to authenticate your web and mobile apps. • 2. Cognito identity pools: • Enable you to grant your users access to other AWS services. You can use identity pools and user pools separately or together.
  • 34. Cognito • Cognito user pools: • Signing up and signing in • Updating the user profile data via standard and custom attributes • Forgot password by providing challenges • Token-based authentication for JSON Web Tokens (JWTs) • Email and SMS two-factor verification
  • 35. Cognito • image source: https://www.notsosecure.com/hacking- aws-cognito-misconfigurations/
  • 37. API Gateway • A service facade for RESTFul applications, the REST architectural approach that integrates via web services. • The API exposes a series of resources in a stateless manner, and applications interact
 with verbs (GET, POST, PUSH, DELETE), indicating the server operation to be done.
  • 40. API Gateway • The endpoint can be configured with the following scopes:
  • 41. API Gateway • The integration request can be made with one of the following: • Lambda function • HTTP • Mock • AWS service • VPC Link
  • 43. WebSocket • Provide bi-directional communication between the client and the server to reach real-time applications: • AWS IoT: • A service designed to connect objects to the IoT via the SDK; you can use the WebSockets via MQTT to push messages back to the client. • AWS AppSync: • Supports the WebSockets protocol, and it can push messages published to subscribers listening to specific topics.
  • 44. Resources • 程式設計冪等設計:資料最終⼀一致性的保證 • Amazon SQS Queue Types • Amazon SQS short and long polling • CDP:Queuing Chain Pattern • CDP:Job Observer Pattern • What Is Amazon Cognito? • WS-Federation⼆二三事