Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Event-driven (Serverless) Applications
Danilo Poccia
AWS Technical Evangelist
@danilop
danilop
2001
Decentralized,
two-pizza teams

Agility, autonomy,
accountability,
and ownership

“DevOps”
You Want to Build
Your Brand New Application
Application

+

Data
Application

+

Data
Websites
Mobile

Apps
Wearable
Application Data
Websites
Mobile

Apps
Wearable
Application
Files
DB
Content +

Some API Calls
API Calls
Websites
Mobile

Apps
Wearable
Application
Files
DB
API Calls
Websites
(JavaScript
Apps)
Mobile

Apps
Wearable
JavaScript
API Calls
Application
Files
DB
API Calls
Websites
(JavaScript
Apps)
Mobile

Apps
Wearable
Services
API Calls
JavaScript
API Calls
Application
Files
DB
API Calls
Websites
(JavaScript
Apps)
Mobile

Apps
Wearable
Services
API Calls
JavaScript
Authenticati...
Application
DB
API Calls
Websites
(JavaScript
Apps)
Mobile

Apps
Wearable
Services
API Calls
JavaScript
Files
Amazon
S3
Am...
How Does It Works?
X
Authentication
Providers
End Users
User

Credentials
Authentication

Token
Amazon Cognito

Identity Broker
Identity Pool...
X
End Users
User

Credentials
Authentication

Token
Amazon Cognito

Identity Broker
Identity Pool Id
(Token)
Identity Id

...
Amazon

CloudFront
API Gateway

Cache
Amazon

CloudWatch
Monitoring & Logs
Endpoints on

Amazon EC2 or
AWS Elastic Beansta...
Managed Cache to Store API Responses

Reduced Latency and DDoS Protection through Amazon CloudFront

SDK Generation for iO...
Business Logic
AWS

Lambda
AWS

Lambda

Functions
Amazon

API Gateway Amazon S3
Amazon

DynamoDB
Amazon Cognito

Sync Stor...
Build Back-end Services that Perform at Scale
Respond Quickly to New Information
Run Your Code without Managing Infrastruc...
Amazon API Gateway
+
AWS Lambda
Resource + HTTP Verb ➔ Method
Resource + HTTP Verb ➔ Method
/books + GET ➔ GetAllBooks
Resource + HTTP Verb ➔ Method
/books + GET ➔ GetAllBooks
/books + POST ➔ CreateNewBook
Resource + HTTP Verb ➔ Method
/books + GET ➔ GetAllBooks
/books + POST ➔ CreateNewBook
/books/{id} + GET ➔ GetBookById
/bo...
Let’s Put Everything Together
Media Sharing Application
λ
λ λ
Amazon

API Gateway
λ
λ
λ
λ
Bucket Usage

Table
Media Metadata
Table
User Stat
Table
User

Location
Table
K / V
λ
λ
...
λ
λ λ
λ
λ
λ
λ
λ
λ
λ
Microservice Architecture
λλ λλ
λλ λλ λ
λ
Choreography vs Orchestration
λλ λλ
λλ λλ λ
λ
Reactive Programming
λλ λλ
λλ λλ λ
λ
<demo>
…
</demo>
Focus on You Idea
aws.amazon.com/free
Event-driven (Serverless) Applications
Danilo Poccia
AWS Technical Evangelist
@danilop
danilop
Building Event-driven Serverless Apps
Upcoming SlideShare
Loading in …5
×

Building Event-driven Serverless Apps

1,761 views

Published on

We built event-driven user interfaces for decades. What about bringing the same approach to mobile, web, and IoT backend applications? You have to understand how data flows and what is the propagation of changes, using reactive programming techniques. You can focus on the core functionalities to build and the relationships among the resources you use. Your application behaves similarly to a “spreadsheet”, where depending resources are updated automatically when something “happens”, and is decomposed into scalable microservices without having to manage the infrastructure. The resulting architecture is efficient and cost effective to run on AWS and managing availability, scalability and security becomes part of the implementation itself.

Published in: Software
  • Be the first to comment

Building Event-driven Serverless Apps

  1. 1. Event-driven (Serverless) Applications Danilo Poccia AWS Technical Evangelist @danilop danilop
  2. 2. 2001
  3. 3. Decentralized, two-pizza teams
 Agility, autonomy, accountability, and ownership
 “DevOps”
  4. 4. You Want to Build Your Brand New Application
  5. 5. Application
 +
 Data
  6. 6. Application
 +
 Data Websites Mobile
 Apps Wearable
  7. 7. Application Data Websites Mobile
 Apps Wearable
  8. 8. Application Files DB Content +
 Some API Calls API Calls Websites Mobile
 Apps Wearable
  9. 9. Application Files DB API Calls Websites (JavaScript Apps) Mobile
 Apps Wearable JavaScript API Calls
  10. 10. Application Files DB API Calls Websites (JavaScript Apps) Mobile
 Apps Wearable Services API Calls JavaScript API Calls
  11. 11. Application Files DB API Calls Websites (JavaScript Apps) Mobile
 Apps Wearable Services API Calls JavaScript Authentication
 & Authorization Caching & Throttling Business
 Logic API Calls
  12. 12. Application DB API Calls Websites (JavaScript Apps) Mobile
 Apps Wearable Services API Calls JavaScript Files Amazon S3 Amazon DynamoDB Authentication & Authorization Amazon
 Cognito Business Logic AWS
 Lambda Caching & Throttling Amazon API
 GatewayAPI Calls
  13. 13. How Does It Works?
  14. 14. X Authentication Providers End Users User
 Credentials Authentication
 Token Amazon Cognito
 Identity Broker Identity Pool Id (Token) Identity Id
 AWS Temp Credentials (Depending on
 Auth / Unauth Role) Access to
 AWS Services (Including Amazon
 API Gateway) Identity Id AWS Temp Credentials Amazon S3 Amazon
 DynamoDB Amazon
 Mobile Analytics Amazon Cognito
 Sync Store K / V Authentication & Authorization Amazon
 CognitoCheck Token
  15. 15. X End Users User
 Credentials Authentication
 Token Amazon Cognito
 Identity Broker Identity Pool Id (Token) Identity Id
 AWS Temp Credentials (Depending on
 Auth / Unauth Role) Access to
 AWS Services (Including Amazon
 API Gateway) Identity Id AWS Temp Credentials Amazon S3 Amazon
 DynamoDB Amazon
 Mobile Analytics Amazon Cognito
 Sync Store K / V Custom
 Authentication Service Get Token Token Authentication & Authorization Amazon
 Cognito
  16. 16. Amazon
 CloudFront API Gateway
 Cache Amazon
 CloudWatch Monitoring & Logs Endpoints on
 Amazon EC2 or AWS Elastic Beanstalk Internet Any other publicly
 accessible endpoint AWS Lambda
 Functions Caching & Throttling Amazon API
 Gateway X Access to
 API Method
  17. 17. Managed Cache to Store API Responses
 Reduced Latency and DDoS Protection through Amazon CloudFront
 SDK Generation for iOS, Android and JavaScript HTTP 429 Response for API Throttling (Managed by the SDK)
 Swagger Support
 Request / Response Data Transformation and API Mocking
  18. 18. Business Logic AWS
 Lambda AWS
 Lambda
 Functions Amazon
 API Gateway Amazon S3 Amazon
 DynamoDB Amazon Cognito
 Sync Store K / VAmazon
 SNS Amazon
 Kinesis Alexa Skills Kit (ASK) Alexa Voice Service (AVS) HTTPS
 Invoke Custom Events HTTPS
 REST API Call Amazon
 SES Amazon
 SWF AWS IoT ? ? ? ? ? ? ?
  19. 19. Build Back-end Services that Perform at Scale Respond Quickly to New Information Run Your Code without Managing Infrastructure Cost-effective and Efficient
  20. 20. Amazon API Gateway + AWS Lambda
  21. 21. Resource + HTTP Verb ➔ Method
  22. 22. Resource + HTTP Verb ➔ Method /books + GET ➔ GetAllBooks
  23. 23. Resource + HTTP Verb ➔ Method /books + GET ➔ GetAllBooks /books + POST ➔ CreateNewBook
  24. 24. Resource + HTTP Verb ➔ Method /books + GET ➔ GetAllBooks /books + POST ➔ CreateNewBook /books/{id} + GET ➔ GetBookById /books/{id} + PUT ➔ CreateOrUpdateBookById /books/{id} + DELETE ➔ DeleteBookById
  25. 25. Let’s Put Everything Together
  26. 26. Media Sharing Application
  27. 27. λ λ λ Amazon
 API Gateway λ λ λ λ Bucket Usage
 Table Media Metadata Table User Stat Table User
 Location Table K / V λ λ λ Amazon Cognito
 Identity Broker Amazon Cognito
 Sync Store Amazon
 SNS Amazon
 Kinesis Media
 Bucket Log Table Authentication & Authorization Upload Picture / VideoUpdate Bucket UsageCheck Bucket Usage Delete “Over Quota” Media Send Notification to User / Application Extract Metadata and Write on DB Update User Statistics Call REST API to Get Media Description Upload Location Info Update User Location Look for Users or Media Near Current Location Call REST API to Get User Info Sync Media and User Rating Write History of Changes Check and Update Ratings Invoke Read Write / Send
  28. 28. λ λ λ λ λ λ λ λ λ λ
  29. 29. Microservice Architecture λλ λλ λλ λλ λ λ
  30. 30. Choreography vs Orchestration λλ λλ λλ λλ λ λ
  31. 31. Reactive Programming λλ λλ λλ λλ λ λ
  32. 32. <demo> … </demo>
  33. 33. Focus on You Idea
  34. 34. aws.amazon.com/free
  35. 35. Event-driven (Serverless) Applications Danilo Poccia AWS Technical Evangelist @danilop danilop

×