15
Serverless Architecture 7-12-2016

Serverless Architecture - introduction + AWS demo

Embed Size (px)

Citation preview

Page 1: Serverless Architecture - introduction + AWS demo

Serverless Architecture

7-12-2016

Page 2: Serverless Architecture - introduction + AWS demo

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

Evolution of runtimes

Page 4: Serverless Architecture - introduction + AWS demo

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

Scalability

Page 6: Serverless Architecture - introduction + AWS demo

Example architectures

- Request/Reply

Page 7: Serverless Architecture - introduction + AWS demo

Example architectures

- Message Driven 

Page 8: Serverless Architecture - introduction + AWS demo

Use cases

• Implementing services/API's• Implementing event driven applications• Log analysis functions•  … (stateless short running transactions)

Page 9: Serverless Architecture - introduction + AWS demo

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

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

Amazon AWS Lambda

Currently the following technologies are supported:• NodeJS• Java• Python• C# (new)

Page 12: Serverless Architecture - introduction + AWS demo

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

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

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

Demo