(This presentation was presented in Serverless Summit.)
Serverless platform can be a very good fit for event driven applications. In this session, we will explore what are event driven applications, their architecture and how serverless platform can be leveraged for creating such applications. We will also explore what are best practices when developing such applications, touching upon areas like security, code portability, modularizing code and relevant patterns, and data proximity issues. This will be followed up by a Demo of event driven Application deployed on serverless platform.
2. Bio
´ Computer Scientist at Adobe
´ Part of Adobe I/O team
´ – platform for developers to integrate, extend, or create apps and experiences
based on Adobe's products and technologies.
´ Working on Adobe I/O Runtime project
´ Serverless platform that allows you to quickly deploy custom code to respond to
events
3. Agenda
´ How server side applications have evolved
´ Moving to Serverless
´ Advantages
´ How backend requirements are evolving to be more EventDriven
´ EventDriven + Serverless
´ Architecture
´ Advantages
´ Things to take care of
´ Recap
9. Advantages of Serverless
´ No administration overhead
´ No Provisioning
´ High availability
´ Development Flexibility
´ Write in your preferred language
´ Focus on business logic
´ Go to market faster
´ Auto Scaling
10. Evolution of backend requirements
Browser
Server
Mobile
IOT
Webhooks
Cron
Scale
HA
APIs
Async
Fault
Tolerant
11. Event Driven applications
´ Traditional applications
´ request response model
´ Event Driven Applications
´ Designed around set of events
´ Each request is an event trigger
´ API calls
´ Webhooks
´ Cron triggers
´ State changes in Database
´ IOT
´ Asynchronous
12. EventDriven + Serverless
´ A natural fit
´ Write simple functions which can handle events
´ Asynchronous
´ Each function scales individually
´ Flexibility to cater to changing requirements
13. EventDriven + Serverless
´ Decoupled code
´ Scale
´ Individual functions scale independently
´ Run in regions were your data is
´ Easy workflows
´ Amazon Step functions
´ OpenWhisk Sequences
15. Serverless pitfalls
´ Vendor lock-in
´ Code Management
´ Poorly written functions ( My function does everything)
´ Not following usual development practices (Pull requests, Code reviews)
´ Security
´ Access control - Can everyone invoke your function ?
´ Data
´ Secrets
´ Lack of Documentation
´ Information not available to others teams to build upon
16. Addressing the problems
´ Vendor Lock-in
´ Abstract vendor specific code to separate modules
´ Build required interfaces
´ Address it right form start
´ Code Management
´ Create simple function ( basic unit which can do one thing great)
´ Building block functions are great for workflows
´ Don’t ignore Development practices like code reviews, pull requests
17. Addressing the problems
´ Security
´ Should never be an after thought
´ Use API gateways
´ Access control
´ Rate limiting
´ Data
´ Secure data at rest
´ Is sensitive data flowing to downstream functions
´ Are third party APIs calls safe?
´ Use Environment variables for secrets
18. Recap
´ Think in terms of Events
´ Think Serverless
´ Serverless compliments event-riven application
´ Think entire system and not just write a function
´ Follow best practices