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.

Montréal AWS Users United: Let's go Serverless!

245 views

Published on

www.meetup.com/Montreal-AWS-Users-United/photos/29059254/472825240/
11 juillet 2018

Published in: Software
  • Be the first to comment

  • Be the first to like this

Montréal AWS Users United: Let's go Serverless!

  1. 1. Let's go Serverless! for AWS User Group
  2. 2. Meetup - Wednesday July 11, 2018 Meetup Agenda 1. Intro & Announcements 2. Stand Up Introductions 3. Presentation: Let’s go Serverless! 4. Speaker: Daniel ZivKovic 5. Feedback, Discussions & Networking 2
  3. 3. Usergroup Organizers & Sponsors ● Daniel ZivKovic, Solutions Architect, TriNimbus ● Serverless.com, Leading Serverless Application Framework ● TriNimbus, Recommended AWS Canada Partner ○ AWS Meetups in Vancouver, Toronto, Montreal, Ottawa, Victoria, Calgary, Edmonton, Waterloo & Quebec City ○ Offices in Vancouver, Calgary, Toronto, Montreal & Macedonia 3
  4. 4. 5 Second Introduction 4
  5. 5. 1. What do you mean Serverless? 2. FaaS vs. Serverless vs. BaaS 3. How did we get here? Serverless past, present & future 4. Popular Use Cases 5. Serverless forecast: How big will serverless be? 6. Get going with The Serverless Framework – walkthrough 7. Products landscape – your Serverless options 8. Learning Serverless 9. Adopting it in your organization Let’s go Serverless – Presentation Agenda 5
  6. 6. Even when people believe in the same idea (or “fight for the same thing”), we may see / interpret things differently based on our position (experiences or biases) to the prism (of life). Disclaimer – Serverless is charged term So, my position is AWS coloured – Orange ;) Where is yours? 6
  7. 7. Servers exists, but developers do not have to worry about them ● Technology is serverless “the same way WiFi is wireless” ○ Gojko Adzic – http://bit.ly/2yQgwwb ● "Serverless is just a name. We could have called it Jeff" ○ said Paul Johnston, and started www.JeffConf.com ● "A Serverless solution is one that costs you nothing to run if nobody is using it (excluding data storage)" ○ Paul Johnston – http://bit.ly/2yRlhFO What do you mean Serverless? 7
  8. 8. … for building Serverless apps FaaS – a new programming model… 8
  9. 9. … unit of deployment and scaling is Function (as opposed to Application, Container, Virtual Server). FaaS is unique, because… 9
  10. 10. Not all FaaS is Serverless: ● Kubeless is not serverless. Serverless contains a subset of FaaS, plus … other Backend Services that cost you nothing when not used (BaaS). 10
  11. 11. Why I’m so excited about Serverless? • Information Technology Past • Present Opportunities • Promising Future 11
  12. 12. ● Growing up, I liked to make models of ships, planes, trains… which translated into the love for creating software. ● Wanted to make useful programs, to help people around ● But, ended up spending more time administrating the computers behind, and making our products Highly Available, Scalability and Secure. ● Especially after Internet came! ● Software became complicated to make… and keep running. IT Past – Personal journey 12
  13. 13. you gather the requirements, architect the solution, your design it, you build it… with pride! Building software products felt like when you want to build a locomotive… 13
  14. 14. … it starts feeling as if you’re *stuck* feeding the steam locomotive with coal! (it’s just it was much colder in the data centers :) But then, when you put it to production… 14
  15. 15. ● That was “my tainted” Developer’s View ● Now, the Operations View ○ In the beginning, IT had “You Build It, You Run It” – DevOps like culture, then ○ we invented the “Toss It Over the Fence” principle, and had Ops people deal with our (cr)app, maintain our computers, databases, networks… ○ which made developers happier/sloppier, but ○ was additional cost for the business/clients. Building vs. Maintaining Software 15
  16. 16. “Toss It Over the Fence” SDLC principle ;) Building vs. Maintaining Software 16
  17. 17. ● Business View As a business owner – you could either under-provision, or over-provision capacity: ○ You’d end up losing business – because your computers are overloaded, apps unreachable… ○ or losing money – if you over-provisioned capacity. So, Capacity Planning discipline/expense was born... Building vs. Maintaining Software 17
  18. 18. … and I had my fair share of contributions to it – while at Sun Microsystems and in Dot-com days. Solving Capacity Planning & Performance Tuning problems became a science! 18
  19. 19. ● We need software more than ever, but ● it became too complicated to make. Serverless wave came unexpectedly when Amazon launched AWS Lambda at re:Invent 2014 https://youtu.be/9eHoyUVo-yg ● Serverless isn't a new thing ● It came on the shoulders of giants (containers) ● It's just the next chapter in the same old journey towards simplicity – the evolution of Cloud Computing The Presence – The software is essential to solving humanity's problems 19
  20. 20. Serverless: Evolution of Compute 20
  21. 21. … trying to get rid of some of this complicated stuff… … looking for higher-level abstractions… We were always striving for simplicity… 21
  22. 22. … with some new qualities that we really like, for managed functions & serverless services in general. ● Dr. Tim Wagner – General Manager of AWS Lambda, Amazon API Gateway, and AWS Serverless App Repository captured this in “The Serverless Manifesto” So, we identified Serverless as the new level of abstraction… 22
  23. 23. The Serverless Manifesto 1. Functions are the unit of deployment and scaling. 2. No machines, VMs, or containers visible in the programming model. 3. Permanent storage lives elsewhere. 4. Scales per request. Users cannot over- or under-provision capacity. 5. Never pay for idle (no cold servers/containers or their costs). 6. Implicitly fault tolerant because functions can run anywhere. 7. BYOC – Bring your own code. 8. Metrics and logging are a universal right. Serverless Compute Qualities 23
  24. 24. ● Developers – makes their work more enjoyable cause they can focus on coding & solving the business problem at hand, rather than looking after the infrastructure. ● Business Owners – less building blocks to worry about & battles to fight, lower TCO. ● End Users – software becomes cheaper, because it is less expensive to build, deliver & maintain. ● In general – Serverless Architectures will enable scalable and cost-effective apps to be built faster. OK, But what are the Serverless benefits? 24
  25. 25. As industry, we tried everything to increase the speed of software development… Latest of which is “sprinting” faster, in shorter 1-week “laps”… Building Apps Faster (in general) 25
  26. 26. And that why Serverless excites me: It will allow us to fail faster, and eventually get to those good ideas we’ll have! Yet, software development is slow not because we are not “sprinting” fast enough, but because... 26 https://vimeo.com/206617354/a4f8a1f8e8
  27. 27. when no one in the company dares to say the truth, that the project leads nowhere ;) Serverless brings hope, we’ll be able “put some clothes” (good ideas) on our “naked bosses”! Work in IT started to resemble “The Emperor's New Clothes” tale: 27 https://en.wikipedia.org/wiki/The_Emperor%27s_New_Clothes
  28. 28. Serverless Use Cases 28
  29. 29. Functions are the glue AWS Lambda = a serverless, event-driven compute service Events are the state changes 29
  30. 30. Invocation Types – Event source mapping 30
  31. 31. Nicely continue microservices evolution of “breaking up the monolith” Serverless Microservices… Nanoservices 31
  32. 32. 1. Customers 2. Amazon API Gateway 3. AWS Lambda 4. Amazon DynamoDB AWS Reference architecture for RESTful Microservices 32
  33. 33. ● Web Applications ● Mobile Backends ● IoT ● Data Processing ○ Batch / ETL / ELT ○ Real-time data stream collection & manipulation ○ Big Data / Data Lakes ● IT Automation – DevOps ○ DIY: Load/Security Testing, Log Monitoring, Auditing, CI/CD ● Chatbots & Amazon Alexa Other popular Use Cases 33
  34. 34. Do not use Serverless for: ● Mission critical apps (when human life depends on your app) – due to cold starts, not published or low SLA-s. ● Long atomic processes – they may timeout! Hard to find experienced engineers. “If all you have is a hammer, everything looks like a nail” – there are mis-use cases 34 Abraham Maslow, The Psychology of Science
  35. 35. Serverless Future – Long-term Forecast 35
  36. 36. What’s missing? ● Tooling ○ Better debugging and monitoring of serverless compute ● We need to tear down the walls between cloud-vendors ○ Monitor https://CloudEvents.io initiative by @CNCF ● Orchestration – some initial workflow engines already exist ○ AWS Step Functions, Azure Logic Apps, Oracle Fn Flow, Fission Workflows Serverless Future – Short-term Forecast 36
  37. 37. Visualization of Microservices flow at Netflix… Serverless – Orchestration Forecast 37 … using Vizceral open-source tool
  38. 38. That could become more intelligent, AI-based orchestration :) Serverless – Orchestration Forecast Doesn’t it remind you of the miracle of breathing? 38
  39. 39. Getting Started with The Serverless Framework • AWS Lambda, using • Node.JS example 39
  40. 40. The easiest way to serverless: ● Open-source CLI, written in NodeJS ● Provider-agnostic abstraction layer ● Function language-agnostic ● Plugin system to extend and hook into life-cycle events ● Easy workflow: ○ write Functions code, ○ package and… ○ deploy via CLI… ○ to your cloud provider of choice. What is The Serverless Framework? 40
  41. 41. The Serverless Framework supports: Supported Infrastructure Providers 41
  42. 42. AWS Lambda Supported Languages ● Node.js ● Python ● Java – slowest cold starts ● C# ● GO – shortest cold starts Amazon as Serverless Infrastructure 42
  43. 43. Pre-requisites ● Cloud CLI tools installed & configured C:Servelress>aws configure AWS Access Key ID [****************TO2x]: AWS Secret Access Key [****************dj12]: Default region name [us-east-1]: Default output format [None]: ● NodeJS 6.10 or later Installed ● Node Package Manager (NPM) AWS Cloud Walkthrough 43
  44. 44. $ npm install -g serverless $ serverless version $ sls create --template aws-nodejs -p toronto $ cd toronto $ code serverless.yml $ code handler.js Commands Executed 44
  45. 45. serverless.yml 45
  46. 46. handler.js 46
  47. 47. $ sls deploy $ sls deploy list $ sls deploy list functions $ sls info $ sls invoke -f hello { "statusCode": 200, "body": "{"message":"Go Serverless v1.0! Your function executed successfully!","input":{}}" } Package, deploy, invoke 47
  48. 48. it’s the URL ending with /dev/daniel Open the endpoint URL in a browser 48
  49. 49. $ sls logs -f hello $ sls metrics $ sls remove Next, read up & play with: ● https://serverless.com/learn/quick-start/ ● https://serverless.com/framework/docs/providers/ More commands & resources 49
  50. 50. From the AWS angle 1. Get any cloud certification to learn about the cloud in general & the services Lambdas can invoke / be invoked from: www.udemy.com/aws- certified-developer-associate/ (google Udemy coupons first!) 2. Watch Serverless talks from the last AWS re:Invent 2017 https://serverless.com/blog/serverless-guide-aws-reinvent-2017/ 3. Take “Production-Ready Serverless – Operational Best Practices” course by Yan Cui @theburningmonk https://www.manning.com/livevideo/production-ready-serverless 4. Connect with me – as I’m deep in the topic (just little AWS-biased) @DanielBookmarks or https://www.linkedin.com/in/magmainc/ or https://www.meetup.com/Serverless-Toronto/ Learning Serverless 50
  51. 51. Migrate Jobs – not Apps ● Look for Batch jobs, ● Disconnected sub-systems exchanging files, that need to share state changes – e.g. update subscription preferences in CRM, upon Mass-mailing campaign executions. ● Jobs that can benefit from parallelization and streaming – file loaders, email processing, clickstream, trading data… Ideas for adopting Serverless at work 51
  52. 52. Even when you’re not in the cloud try to apply Twelve-Factor App Methodology to build / refactor your apps: ● In general – https://12factor.net ● Serverless specific – by Chris Munns @chrismunns ○ slides https://www.slideshare.net/AmazonWebServices/twelve- factor-serverless-applications ○ video https://youtu.be/19SCqWGqtto Ideas for adopting Cloud-native at work 52
  53. 53. Planning Serverless next steps… Discussion 53
  54. 54. @goServerless Montreal AWS Users Group @3nimbus 54
  55. 55. Contact me when ready to apply: daniel@TriNimbus.com Guess What? @3Nimbus is hiring Cloud Solutions Architects, DevOps Engineers, Sales Executives Go to www.TriNimbus.com and click “Careers” 55

×