Date post: | 23-Jan-2018 |
Category: |
Software |
Upload: | codeops-technologies-llp |
View: | 1,901 times |
Download: | 0 times |
CodeOps Technologies
Serverless Architecture Patterns
Manoj GanapathiChief Architect, [email protected]@manojgr
Serverless: Core Principles❖ Functions are the unit of deployment and scale
❖ Use Serverless to solve specific problems, not every application can be written as Serverless.
❖ Keep your functions Stateless – use cloud storage for WIP state
❖ Functions should:
❖ “Do One Thing”– Single Responsibility Principle
❖ Be Idempotent
❖ Finish as fast as possible
“Rethink your application as an orchestra of autonomous functions”
Architectures•Compute as a
Backend•Real-time
Processing•Compute as a glue•Hybrid•Proxy
Use Cases•App Backend•Data Pipelines•Bots and Skills•Legacy API Proxy•Scheduled/Event
Driven services•Stream Processing
Patterns•Messaging•Command•Pipes and Filter•Fan Out•Priority Queue
Reference: Serverless Architectures on AWS
Key Patterns
Messaging and Command• Decouple services by introducing a queue• Typically in asynchronous messaging in web apps and services to take the
load off the application• Also shows the Command pattern (encapsulated implementation for a
standard interface)
Reference: Serverless Architectures on AWS
Fan Out
• Topic-Subscription scenario. • For e.g: Once a video is uploaded, you may want to encode them in
multiple formats in parallel and also transcribe
Reference: Serverless Architectures on AWS
Pipes and Filter
• To manage a sequential series of tasks – like a data pipeline• Functions can work as a pipe (connector) or a filter (transformation)
Reference: Serverless Architectures on AWS
Appendix AWS Lambda and Azure Functions examples
AWS: Web Applications
https://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-serverless-architectural-patterns-and-best-practices-arc402
AWS: Batch Processing
https://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-serverless-architectural-patterns-and-best-practices-arc402
AWS: Stream Processing
https://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-serverless-architectural-patterns-and-best-practices-arc402
Azure Functions: Stream Processing
https://www.slideshare.net/satonaoki/serverless-patterns-with-azure-functions
Azure Functions: Managing Dialog responses in Chatbots
https://www.slideshare.net/satonaoki/serverless-patterns-with-azure-functions
Azure Functions: Integration and Web API
https://www.slideshare.net/ServerlessConf/chris-anderson-and-yochay-kiriaty-serverless-patterns-with-azure-functions
AWS: Event Driven Automation
https://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-serverless-architectural-patterns-and-best-practices-arc402
Azure Functions: Service Event Processing
https://www.slideshare.net/satonaoki/serverless-patterns-with-azure-functions