serverless architecture - introduction + aws demo
TRANSCRIPT
![Page 1: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/1.jpg)
Serverless Architecture
7-12-2016
![Page 2: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/2.jpg)
Definitions
BaaS (Backend-as-a-Service) vs
FaaS (Function-as-a-Service)
"Abstracting the server away from the developer. Not removing the server itself"
![Page 3: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/3.jpg)
Evolution of runtimes
![Page 4: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/4.jpg)
Evolution of runtimes
• Monolithic runtime• Multiple applications/services share a single runtime
• Containerization• A single application/service runs in its own runtime
(container)• Serverless
• Every request/message is handled in its own runtime
![Page 5: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/5.jpg)
Scalability
![Page 6: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/6.jpg)
Example architectures
- Request/Reply
![Page 7: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/7.jpg)
Example architectures
- Message Driven
![Page 8: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/8.jpg)
Use cases
• Implementing services/API's• Implementing event driven applications• Log analysis functions• … (stateless short running transactions)
![Page 9: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/9.jpg)
Technical platforms
Amazon Lambdahttps://aws.amazon.com/lambda
Google Functionshttps://cloud.google.com/functions
Microsoft Azure Functions https://azure.microsoft.com/services/functions
Oracle Functions(slides Thomas Kurian @ OOW 2016)
![Page 10: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/10.jpg)
Amazon AWS Lambda
• First commercial offering for FaaS / serverless
• Tightly integrated in the AWS Cloud Offering• Amazon API Gateway
• API Gateway can forward requests to AWS Lambda applications
• Faas triggers include• Amazon DynamoDB table updates• Object modifications in AWS Buckets• Amazon Kinesis stream• Amazon IoT events
• Billing is for uptime – pay per use• Billing is metered in increments of 100 milliseconds
![Page 11: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/11.jpg)
Amazon AWS Lambda
Currently the following technologies are supported:• NodeJS• Java• Python• C# (new)
![Page 12: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/12.jpg)
Google functions
• Triggers include• HTTP triggers• Cloud pub/sub triggers*• Cloud storage triggers**• Direct triggers
Currently the following technologies are supported:• NodeJS
*Google Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications.
**Cloud Functions can respond to Object Change Notifications emerging from Google Cloud Storage. These change notifications are triggered in response to object addition (create), update (modify), or deletion.
![Page 13: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/13.jpg)
Azure functions
• Triggers include• Timer based triggers• Azure service triggers (record inserted in Azure db)• Microsoft SaaS triggers (e.g. file is uploaded to one Drive)• HTTP triggers• Streaming triggers• Cortana/chat bot triggers
• Currently the following technologies are supported:• NodeJS• C#• F#• Python• PHP
![Page 14: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/14.jpg)
Challenges and advantages
• Challenges• No form of state (Session, object, etc.) can be stored/used in
the function. This includes in memory state!• Execution time is restricted, AWS Lambda restricts execution
time to 5 minutes. • Startup latency
• Advantages• "Infinite" scalability• Easier operational management• Greener computing• Reduced packaging/deployment complexity
![Page 15: Serverless Architecture - introduction + AWS demo](https://reader035.vdocuments.net/reader035/viewer/2022070509/58a0ba701a28ab75368b70b3/html5/thumbnails/15.jpg)
Demo