View
54
Download
3
Category
Preview:
Citation preview
Serverless Architecture
7-12-2016
Definitions
BaaS (Backend-as-a-Service) vs
FaaS (Function-as-a-Service)
"Abstracting the server away from the developer. Not removing the server itself"
Evolution of runtimes
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
Scalability
Example architectures
- Request/Reply
Example architectures
- Message Driven
Use cases
• Implementing services/API's• Implementing event driven applications• Log analysis functions• … (stateless short running transactions)
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)
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
Amazon AWS Lambda
Currently the following technologies are supported:• NodeJS• Java• Python• C# (new)
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.
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
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
Demo
Recommended