Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Server-Side goes Serverless

Server-Side goes Serverless

Slides from my talk at Google I/O 2017 Extended Fortaleza where we try to understand why the serverless architecture's been drawing so much attention from developers lately by seeing how this model can help significantly reduce the operational costs and complexity of our applications.

Matheus Albuquerque

May 19, 2017
Tweet

More Decks by Matheus Albuquerque

Other Decks in Programming

Transcript

  1. !!!

  2. #1

  3. / Matheus Albuquerque full-stack developer draft illustration enthusiast open source

    lover web alchemist Felipe Borges back-ender minecraft lover mobile developer google enthusiast
  4. / Matheus Albuquerque full-stack developer draft illustration enthusiast open source

    lover web alchemist Felipe Borges back-ender minecraft lover mobile developer google enthusiast
  5. / Matheus Albuquerque full-stack developer draft illustration enthusiast open source

    lover web alchemist Felipe Borges back-ender minecraft lover mobile developer google enthusiast
  6. / Matheus Albuquerque full-stack developer draft illustration enthusiast open source

    lover web alchemist Felipe Borges back-ender minecraft lover mobile developer google enthusiast
  7. / Matheus Albuquerque full-stack developer draft illustration enthusiast open source

    lover web alchemist Felipe Borges back-ender minecraft lover mobile developer google enthusiast #after 
  8. ✓ logic is executed in an environment without visible processes,

    OS, servers or virtual machines ✓ the responsibility for provisioning and managing the infrastructure belongs entirely to the service provider ✓ significantly depend on third-party services ✓ functionality needed was offered as services, covering databases, messaging, authentication, etc ✓ software developer focuses on writing code
  9. ✓ started as MBaaS ✓ provide server-side logic ✓ manage

    their internal states ✓ applications that do not have application- specific, server-side logic ✓ use third-party services for everything
  10. ✓ Authentication as a Service (Auth0, AWS Cognito, Firebase) ✓

    Logging as a Service (Loggly, Logsense, Amazon Elasticsearch Service) ✓ Analytics as a Service (Amazon Kinesis, Keen IO).
  11. ✓ short-living stateless functions ✓ triggered by events ✓ provider

    does the rest: ✓ provisioning instances of such functions, ✓ terminating instances, ✓ monitoring all of them, ✓ identity and logging services, ✓ …
  12. ✓ a suite of small services ✓ each running in

    its own process ✓ each communicating with lightweight mechanisms ✓ these services are built around business capabilities ✓ independently deployable
  13. microservice !→ all CRUD operations on an account nanoservice !→

    each account operation: create, read, update, and delete
  14. ✓ removes much of the database administration overhead ✓ provides

    mechanisms of authorization for different types of users
  15. ✓ democratize things ✓ breaking down components by logic /

    domain even without working with the operational costs (startups )
  16. × compressing your code × puppet / chef × start

    / stop shell scripts × decisions about whether to deploy one or many containers on a machine
  17. × not efficient for long-running applications × vendor lock-in ×

    introduce additional overhead for function/microservice calls × multitenancy × cold start × different methods for logging in functions
  18. $ npm install -g firebase-tools $ firebase init $ firebase

    deploy $ firebase login $ firebase init functions const functions = require('firebase-functions'); …
  19. ✓ reduced time ✓ lower operational and development costs ✓

    works well with agile development ✓ allows developers to focus on code and to deliver faster ✓ fits with microservices ✓ reduces the complexity ✓ simplifies packaging and deployment
  20. !!!