Fireship · @fireship

Serverless Computing in 100 Seconds

Uploaded March 17, 2021 · Length 16:46

Serverless Computing in 100 Seconds

Summary

Fireship explains serverless computing with AWS Lambda, Google Cloud Functions, and Azure Functions, and demonstrates a Firebase Cloud Functions setup for a product delivery service.

  • serverless computing
  • aws lambda
  • google cloud functions
  • azure functions
  • firebase cloud functions
  • backend development
  • product delivery service

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    serverless computing it's a misnomer

  2. 0:02

    used to describe servers in the cloud

  3. 0:04

    that requires zero configuration or

  4. 0:06

    maintenance from the developer

  5. 0:07

    imagine you need water for your house

  6. 0:09

    you could spend a bunch of time and

  7. 0:10

    money digging a well

  8. 0:11

    testing the water quality and plumbing

  9. 0:13

    it to your house or you could just tap

  10. 0:15

    into the city water supply

  11. 0:16

    and pay a monthly fee based on the

  12. 0:18

    amount of water that you use

  13. 0:19

    serverless computing is the same idea

  14. 0:21

    but instead of water

  15. 0:22

    we're talking about the amount of cpu

  16. 0:24

    and memory it takes to run your code

  17. 0:26

    services like aws lambda google cloud

  18. 0:29

    functions and

  19. 0:30

    azure functions allow you to run your

  20. 0:31

    back-end code across their global data

  21. 0:33

    centers

  22. 0:34

    then they mail you a bill at the end of

  23. 0:35

    the month that's factored down to the

  24. 0:37

    millisecond

  25. 0:37

    the beauty of this approach is that your

  26. 0:39

    only concern is writing code

  27. 0:41

    you don't have to pick an operating

  28. 0:42

    system configure networking patch

  29. 0:44

    improvements or provision capacity to

  30. 0:46

    run at scale the cloud handles all that

  31. 0:48

    for you behind the scenes

  32. 0:49

    from an architectural standpoint it

  33. 0:51

    allows you to develop and test each

  34. 0:53

    business requirement

  35. 0:54

    independent of a bigger monolithic

  36. 0:56

    system not only do serverless functions

  37. 0:58

    make servers easier to manage

  38. 1:00

    but they can also be executed based on

  39. 1:02

    different events that happen in the

  40. 1:03

    cloud

  41. 1:03

    which can actually simplify your backend

  42. 1:05

    code for example

  43. 1:06

    you might create a new database record

  44. 1:08

    when a user places an order which then

  45. 1:10

    triggers a serverless function to

  46. 1:12

    send an email confirmation or maybe an

  47. 1:14

    iot event on a home security system

  48. 1:16

    invokes a function that sends a push

  49. 1:18

    notification to the user's device

  50. 1:20

    one of the easiest ways to get started

  51. 1:21

    with serverless is firebase cloud

  52. 1:23

    functions the command line tool will

  53. 1:25

    give us a project

  54. 1:26

    that looks like any other node.js

  55. 1:28

    backend in the code we can export named

  56. 1:30

    functions

  57. 1:31

    that are configured to run on different

  58. 1:33

    events that happen in google cloud

  59. 1:34

    an event could be a simple http request

  60. 1:37

    or a file upload database write

  61. 1:40

    analytics event and so on after writing

  62. 1:42

    our code we can then deploy it to

  63. 1:43

    production with a single command and we

  64. 1:45

    now have a reliable backend that is

  65. 1:47

    ready to scale

  66. 1:48

    this has been serverless in 100 seconds

  67. 1:51

    but if that sounded too good to be true

  68. 1:52

    make sure to stay tuned because i've

  69. 1:54

    invited dane from the filled stacks

  70. 1:56

    youtube channel to show us how to build

  71. 1:58

    a serverless backend for a big complex