Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Serverless Finland Meetup 10.5.2015: Serverless Framework and Serverless Architecture Patterns

395 views

Published on

Serverless Finland Meetup 10-05-2017. Serverless Framework and SC5 serverless bloilerplate. Sample Serverless cases and architectural patterns

Published in: Internet
  • Be the first to comment

  • Be the first to like this

Serverless Finland Meetup 10.5.2015: Serverless Framework and Serverless Architecture Patterns

  1. 1. SERVERLESS FINLAND MEETUP Serverless Framework + SC5 Boilerplate Sample cases and architecture patterns 10.5.2017
  2. 2. ABOUT OUR HOST COMPANY
  3. 3. SC5 IN BRIEF 3 What you should know about us CLOUD SOLUTIONS BUSINESS APPLICATIONS DIGITAL DESIGN 10+ YEARS 100+ CUSTOMERS 400+ PROJECTS HEL JKL 85 HACKERS DESIGNERS 7 MEUR 2016MACHINE LEARNING
  4. 4. TRACK RECORD OF SERVERLESS DELIVERIES 16 CUSTOMERS SINCE 2016 VARIETY OF SOLUTIONS ▪ Serverless web applications (cloud backend + UI) ▪ IoT solutions ▪ Hybrid Cloud Enterprise APIs ▪ Intelligent applications ▪ Chatbots MEDIA FINANCE OTHER INDUSTRIAL SOFTWARE ENERGY INDUSTRIAL MULTICLOUD CAPABILITY FOOD INDUSTRIAL
  5. 5. RECOGNIZED SERVERLESS CONTRIBUTOR PARTNERSHIPS CONTRIBUTIONS ▪ Author of several Serverless plugins / boilerplates ▪ Active serverless workshop & event organizer (e.g. bot workshop at ServerlessConf London 2016) ▪ Founder and main organizer of Serverless Finland (serverless.fi) community (over 230 members) AWS Consulting Partner AWS Lambda delivery partner, API Gateway delivery partner, DynamoDB delivery partner Serverless Framework partner (1 of 4 worldwide)
  6. 6. SERVERLESS FRAMEWORK SC5 BOILERPLATE
  7. 7. WHY SERVERLESS (FRAMEWORK)? ▪ Ready tooling for building and deployment of Serverless application ▪ Plug-in mechanism to enhance and customize the development experience ▪ Capability (via plugins) to run Lambda functions locally (run & test without deployment) ▪ Easier to debug (consume logs locally) ▪ Multi-cloud support (AWS + Azure / Google / Bluemix)
  8. 8. SERVERLESS FRAMEWORK 1.X SERVICE FUNCTION(S)CONFIGURATION EVENTS RESOURCES FUNCTION FUNCTION FUNCTION ACTIONS CREATE INVOKE INFO LOGS DEPLOY PLUGINS
  9. 9. SERVERLESS IN ACTION
  10. 10. Register http event for Lambda
  11. 11. LIMITATIONS OF ”VANILLA” SERVERLESS ▪ No ability to run code / test offline ▪ Deployment produces an unoptimal package => slow ”cold start” ▪ Need to manually set up tests ▪ Need to define IAM Roles for AWS Resources (DynamoDB / SNS) Let’s give the SC5 Serverless boilerplate a try! https://github.com/SC5/sc5-serverless-boilerplate
  12. 12. Plugins Grant permissions to DynamoDB and SNS Exclude unnecessary items from deployment
  13. 13. Command provided by serverless-mocha-plugin
  14. 14. Test created by serverless-mocha-plugin
  15. 15. Command provided by serverless-mocha-plugin Command provided by serverless-offline
  16. 16. webpack-plugin
  17. 17. ADDITIONAL RESOURCES Boilerplates ▪ https://github.com/SC5/serverless-messenger-boilerplate : Create bots using Messenger Platform and Wit.ai ▪ https://github.com/laardee/serverless-authentication-boilerplate : Create API Gateway custom authorizers Workshops ▪ http://serverless.fi/docs/blog-workshop.pdf : Build a simple serverless chat service ▪ http://serverless.fi/docs/messenger-workshop.pdf : Build a Messenger weather bot using Wit.ai and Serverless
  18. 18. SAMPLE SERVERLESS CASES ARCHITECTURAL PATTERNS
  19. 19. HAPPY OR NOT WEBSHOP (2015) (SUB)OBJECTIVE: ★ Create Authorize.net profile, Salesforce account, order, invoice after webshop purchase (async) CHALLENGES: ★ Lambda max timeout 60 secs ★ No guarantee for the whole chain to perform within timeout 27 Challenges
  20. 20. HAPPY OR NOT WEBSHOP (2015) 28 Decoupling with SNS 1. Receive confirmation from Authorize.net 2. Create Authorize.net Payment profile 3. Create Salesforce account & contact 4. Create Salesforce order & invoice SESSION TABLE (Lambdas read and update info) WEBSHOP TOPIC (Lambdas subscribe and post to topic)
  21. 21. HOW IT COULD BE DONE IN 2017 29 HappyOrNot Webshop 1. Receive confirmation from Authorize.net 3a. Create Authorize.net Payment profile 3b. Create Salesforce account & contact 3c. Create Salesforce order & invoice SESSIONS (Lambdas read and update info) 2. Launch step function 3. Step function controls flow of Lambda calls
  22. 22. GASUM ONLINE PORTAL (2016) SUBOBJECTIVE: ★ Build an API (read/write) on top of data managed internally CHALLENGES: ★ No network / API access to internal application 30 Challenges
  23. 23. GASUM ONLINE PORTAL (2016) 31 Hybrid data setup & API Serve API calls from application(s) Subscribe S3 bucket Update database on uploads Read (DB) / write (DB, S3) based on API requests S3 bucket as proxy for communication Internal Application .EXE Client app syncs data between ERP and S3
  24. 24. SC5 OPS MACHINE (2017) OBJECTIVE: ★ Collect data from different data sources to a consistent and easily accessible data set (e.g. PowerBI / applications / business automation) 32 Challenges
  25. 25. SC5 OPS MACHINE (2017) 33 Serverless data pipeline 1. Scheduled event(s) fire Lambda(s) 2. Lambdas extract data from source systems to S3 3. Lambdas subscribe to S3, normalize data and save to S3 EXTRACTED DATA NORMALIZED DATA 4. Lambdas subscribe to S3, store data to various targets Source / target system access secrets encrypted using KMS
  26. 26. HOW IT COULD BE DONE (SOON?) 34 Data pipeline
  27. 27. VIDEO CONTENT CLASSIFIER (2017) OBJECTIVE: ★ Identify contents of video (entry for contest in ServerlessConf Austin 2017) 35 Challenges
  28. 28. DEMO

×