Enhance your app's backend with Cloud Functions for Firebase (ServerlessDays Hamburg 2019)

Enhance your app's backend with Cloud Functions for Firebase (ServerlessDays Hamburg 2019)

3acd4fb373289e71fd7ebfb287a75a3b?s=128

Doug Stevenson

February 14, 2019
Tweet

Transcript

  1. Enhance your app's backend with Cloud Functions for Firebase Doug

    Stevenson @CodingDoug Codelab: bit.ly/cf3-codelab
  2. @CodingDoug bit.ly/what-is-firebase

  3. @CodingDoug serverless / JavaScript / node.js

  4. @CodingDoug Cloud Functions is a Google Cloud product

  5. @CodingDoug Firebase adds tools and APIs

  6. @CodingDoug What is “serverless”? • Servers (!!) • No maintenance

    • Automatic scaling up and down • Pay only for what you use • Event-driven
  7. @CodingDoug Cloud Functions is event-driven Cloud Functions event providers Cloud

    Storage Firebase Auth Crashlytics Cloud Firestore function (event) { doStuff(event) } trigger emit events
  8. @CodingDoug Cloud Functions scales up and down with load Cloud

    Functions function (event) { doStuff(event) }
  9. @CodingDoug Cloud Firestore Firebase Crashlytics Firebase Authentication Firebase Realtime Database

    HTTPS endpoints Cloud Pub/Sub Cloud Storage Google Analytics for Firebase Event providers
  10. @CodingDoug Why use Cloud Functions? • Don’t repeat yourself. ◦

    Share common app logic between app platforms. • Be fast and reliable. ◦ Offload work to be done in the background. • Don’t trust the user’s device. ◦ Secure your sensitive code.
  11. @CodingDoug When NOT to use Cloud Functions? • Your app

    can’t tolerate “cold start” times. ◦ Instead, maintain your own servers 24/7. • You have heavyweight work to do ( > 9 min, > 2GB mem/disk ) ◦ Delegate work to App Engine or Compute Engine • You need to keep a socket open or do streaming ◦ No easy alternative
  12. @CodingDoug Resources What is Firebase? bit.ly/what-is-firebase Cloud Functions docs bit.ly/cf3-docs

    Video tutorials bit.ly/cf3-videos Sample code bit.ly/cf3-samples Codelab bit.ly/cf3-codelab My samples gist.github.com/CodingDoug
  13. @CodingDoug Resources Universal translator code github.com/CodingDoug

  14. Thank you! @CodingDoug firebase.google.com