What is the difference between Cloud Functions and Firebase Functions?

Muhammad chhota

Cloud Functions and Firebase Functions (or "Cloud Functions for Firebase") both look the same. Please describe the use case of each.

Both use HTTP functions.

In the Cloud Functions:

exports.helloHttp = function helloHttp (req, res) {
  res.send(`Hello ${req.body.name || 'World'}!`);
};

And in the Firebase Functions:

exports.helloWorld = functions.https.onRequest((request, response) => {
  response.send("Hello from Firebase!");
});

What is difference between these?

Frank van Puffelen

There is no product called Firebase Functions.

There are three separate things:

  1. Google Cloud Functions, which allow you to run snippets of code in Google's infrastructure in response to events.
  2. Cloud Functions for Firebase, which triggers Google Cloud Functions based on events in Firebase (such as database or file writes, user creation, etc)
  3. Firebase SDK for Cloud Functions, which includes a library (confusingly called firebase-functions) that you use in your Functions code to access Firebase data (such as the snapshot of the data that was written to the database)

So Firebase provides a (relatively thin) wrapper around Google Cloud Functions, to make the latter product easier to use and integrate it with Firebase. In that senses it is similar to how Firebase integrates Google Cloud Storage into "Cloud Storage for Firebase" (formerly known as Firebase Storage).

If you're using Google Cloud Platform without Firebase, then you should use plain Google Cloud Functions. If you're on Firebase or if you're a mobile developer interested in Cloud Functions, you should use Cloud Functions for Firebase.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Firebase Cloud Functions: Difference between onRequest and onCall

From Java

What is the difference between these arrow functions

From Dev

What is the difference between functions and closures?

From Dev

What is the difference between functions and closures?

From Dev

What is difference between 2 functions

From Dev

Javascript - What is the difference between these constructor functions?

From Dev

What is the difference between these two functions in Javascript?

From Java

What is the difference between flatten and ravel functions in numpy?

From Dev

What is the difference between macros and functions in Rust?

From Dev

What is the difference and issues between these two clojure functions?

From Dev

What is the difference between the functions tapply and ave?

From Java

What's the difference between these two functions

From Dev

What difference between rand() and random() functions?

From Dev

What's the difference between these two functions?

From Dev

What is the difference between anonymous and inline functions in JavaScript?

From Dev

What is the difference between these two recursive functions?

From Dev

What is the difference between immutable and const member functions?

From Dev

What is the difference between these two recursive ocaml functions?

From Dev

What is the difference between the functions seq?, sequential? and coll?

From Dev

What's the difference between these two functions in JavaScript?

From Dev

What is the difference between these JavaScript anonymous functions?

From Dev

What is the difference between these two ruby functions?

From Dev

What exactly is the difference between these two javascript functions?

From Dev

What is a difference between ofSeq and ofList functions?

From Dev

What is the difference between these two recursive functions?

From Dev

Javascript - What is the difference between these constructor functions?

From Dev

What is the difference and issues between these two clojure functions?

From Dev

What is the difference between these two ruby functions?

From Dev

What is the difference between scope of these two functions

Related Related

  1. 1

    Firebase Cloud Functions: Difference between onRequest and onCall

  2. 2

    What is the difference between these arrow functions

  3. 3

    What is the difference between functions and closures?

  4. 4

    What is the difference between functions and closures?

  5. 5

    What is difference between 2 functions

  6. 6

    Javascript - What is the difference between these constructor functions?

  7. 7

    What is the difference between these two functions in Javascript?

  8. 8

    What is the difference between flatten and ravel functions in numpy?

  9. 9

    What is the difference between macros and functions in Rust?

  10. 10

    What is the difference and issues between these two clojure functions?

  11. 11

    What is the difference between the functions tapply and ave?

  12. 12

    What's the difference between these two functions

  13. 13

    What difference between rand() and random() functions?

  14. 14

    What's the difference between these two functions?

  15. 15

    What is the difference between anonymous and inline functions in JavaScript?

  16. 16

    What is the difference between these two recursive functions?

  17. 17

    What is the difference between immutable and const member functions?

  18. 18

    What is the difference between these two recursive ocaml functions?

  19. 19

    What is the difference between the functions seq?, sequential? and coll?

  20. 20

    What's the difference between these two functions in JavaScript?

  21. 21

    What is the difference between these JavaScript anonymous functions?

  22. 22

    What is the difference between these two ruby functions?

  23. 23

    What exactly is the difference between these two javascript functions?

  24. 24

    What is a difference between ofSeq and ofList functions?

  25. 25

    What is the difference between these two recursive functions?

  26. 26

    Javascript - What is the difference between these constructor functions?

  27. 27

    What is the difference and issues between these two clojure functions?

  28. 28

    What is the difference between these two ruby functions?

  29. 29

    What is the difference between scope of these two functions

HotTag

Archive