Great firebase world. Good that I was too busy and did not worry yet about messages to user and spin up my own server - now I can take the shortcut. And I can eliminate the 4 client side loops of uploading images at different resolutions!
I think primary difference in business models between Parse and Firebase is that Google wants users to convert to GCloud whereas Parse existed in isolation. Facebook acquired Parse but didn't have a hosting solution. It was disparate from Facebook's core business model. Meanwhile, Firebase is not only relevant to Google's core business model but it's also hungry to capture a more sizable share of the market going forward. Best way to do that? Abstract complexity of app creation (i.e. make it easy for developers to start) and inextricably bind it to Google Cloud infrastructure (i.e. make it difficult for developers to leave later on).
And when I say "convert" I mean: a) convert into paying customers from Firebase's free tier b) start using other GCloud instances which integrate seamlessly with Firebase because they're built on same platform
My cloud function code does a ton of preprocessing (1 hour's worth) before it's ready, and if it idles for too long, the whole thing restarts, and a function call will trigger the entire hour-long preprocessing to start over again! Does anyone else have this problem?
#AskFirebase My question is this: I´m trying to send a push notification to a group of devices, I have a node of all the users and their current Firebase tokens. When a user sends a message to a group of devices, I read each value of each user email and get each token, then proceed to send for each token a message. I know that Firebase provide a method for susbcriptions, the thing is that is not a good idea to use that because maybe the users don´t want to be susbribed to the specific topic of the message. I know that there´s a method on the server where I get the user´s email by getting their user token, is there a way to use it the other way around (getting the user token using the email)?
Push is based on devices, not users. If you want a linking you'll need to maintain it yourself. You can do this in the database like I did or you can create a topic for users in addition to/instead of rooms. Hopefully users wouldn't feel upset being subscribed to their username ;)
Hm. This is confusing if you've just come from the Google Cloud Functions video from a standpoint of actually wanting to use them. I guessed that Firebase would just be a service that can trigger vanilla cloud functions. But what I'm seeing here is a whole different way of coding cloud functions and a whole different way of deploying them. I wish they'd have explained the reasons behind this, and what extra magic the Firebase toolset is adding to the mix.
Awesome demo! Is there a way to expose env variables for functions? Can't find any explanations as to how to do that. I need to connect to a third party API and need to put my keys and secrets somewhere other than on the source code.
We don't support raw process.env yet, but we have structured variable support in functions.config(). You can set these with the CLI. They're stored outside your git repo and combined with your function at deploy time. Find out more at firebase.google.com/docs/functions/config-env
Great demo ! Managed Node.js with async / await, lots of inputs (HTTP, Auth, Analytics)... That rocks. Nice work :) I just didn't get the "let [langs]" ; What is this syntax for ?
it's a destructuring assignment. Say you have let myArray = [1, 2, 3, 4]; you could use destructuring to assign each of those elements to a variable let [a, b, c, d] = myArray; console.log(a) // prints 1 console.log(b) // prints 2 console.log(c) // prints 3 console.log(d) // prints 4
Hey Denis! That syntax is "destructuring". It's basically just a concise way of saying that langs is equal to the first value in the array on the other side of the equal sign: babeljs.io/learn-es2015/#ecmascript-2015-features-destructuring
Whenever I explicitly demonstrated using autocomplete this is WebStorm taking advantage of the TypeScript support in the Firebase SDK for Cloud Functions. If I simply typed a few characters and a large code snippet appeared it's because I chopped up my demo in TextExpander to help speed things up/reduce bugs.
This is awesome! I was just starting to write a server for my game, I just deleted my 1 day work, I will have to learn node and js though, I actually knew js years back but it looks like it changed a lot so good luck to me... I would prefer this in java but I guess its a good time to re-learn js
#askfirebase I am simply pushing data to a child node on onWrite trigger.Its failing every time with following error.Please guide. Error: Firebase.push failed: first argument contains a function in property 'users.app.firebaseInternals_.firebase_.credential.cert' with contents: function (serviceAccountPathOrObject) { var stringifiedServiceAccount = JSON.stringify(serviceAccountPathOrObject); if (!(stringifiedServiceAccount in globalCertCreds)) { globalCertCreds[stringifiedServiceAccount] = new credential_1.CertCredential(serviceAccountPathOrObject); } return globalCertCreds[stringifiedServiceAccount]; }
the only thing that I dislike from firebase is the autentification part, for my users it will be pretty anoying if I made them log in with their google accounts and with their user/password, Imagine trying to log in to your facebook/twiter account we enter user/password, and them we are prompted with another log in with our google accounts, it will be pretty anoying
Great firebase world. Good that I was too busy and did not worry yet about messages to user and spin up my own server - now I can take the shortcut. And I can eliminate the 4 client side loops of uploading images at different resolutions!
Extremely impressive! We've been waiting for these exact features! Hooray #Firebase!
Hope you DONT add the "Screw you guys, Im going home" feature from Parse.
I would move to Microsoft's Bing and cancel all subscriptions with Google if that happens.
that was such a painful episode. Google being much larger i hope shows more stability
I think primary difference in business models between Parse and Firebase is that Google wants users to convert to GCloud whereas Parse existed in isolation. Facebook acquired Parse but didn't have a hosting solution. It was disparate from Facebook's core business model. Meanwhile, Firebase is not only relevant to Google's core business model but it's also hungry to capture a more sizable share of the market going forward. Best way to do that? Abstract complexity of app creation (i.e. make it easy for developers to start) and inextricably bind it to Google Cloud infrastructure (i.e. make it difficult for developers to leave later on).
And when I say "convert" I mean: a) convert into paying customers from Firebase's free tier b) start using other GCloud instances which integrate seamlessly with Firebase because they're built on same platform
Thanks to Parse, if they had not done it I would never have known Firebase.
Can the source for be downloaded anywhere ?
This is a brilliant talk, should be taught in schools itself.
My cloud function code does a ton of preprocessing (1 hour's worth) before it's ready, and if it idles for too long, the whole thing restarts, and a function call will trigger the entire hour-long preprocessing to start over again! Does anyone else have this problem?
#AskFirebase
My question is this: I´m trying to send a push notification to a group of devices, I have a node of all the users and their current Firebase tokens. When a user sends a message to a group of devices, I read each value of each user email and get each token, then proceed to send for each token a message.
I know that Firebase provide a method for susbcriptions, the thing is that is not a good idea to use that because maybe the users don´t want to be susbribed to the specific topic of the message.
I know that there´s a method on the server where I get the user´s email by getting their user token, is there a way to use it the other way around (getting the user token using the email)?
Push is based on devices, not users. If you want a linking you'll need to maintain it yourself. You can do this in the database like I did or you can create a topic for users in addition to/instead of rooms. Hopefully users wouldn't feel upset being subscribed to their username ;)
Hm. This is confusing if you've just come from the Google Cloud Functions video from a standpoint of actually wanting to use them. I guessed that Firebase would just be a service that can trigger vanilla cloud functions. But what I'm seeing here is a whole different way of coding cloud functions and a whole different way of deploying them. I wish they'd have explained the reasons behind this, and what extra magic the Firebase toolset is adding to the mix.
Awesome demo! Is there a way to expose env variables for functions? Can't find any explanations as to how to do that. I need to connect to a third party API and need to put my keys and secrets somewhere other than on the source code.
You could add them to a Firebase database table that isn't readable by users?
Christopher Read ur right... now I feel dumb haha, my head still thinks of firebase as a simple DB... thanks for the answer!
We don't support raw process.env yet, but we have structured variable support in functions.config(). You can set these with the CLI. They're stored outside your git repo and combined with your function at deploy time. Find out more at firebase.google.com/docs/functions/config-env
Thomas Bouldin freaking awesome! thanks for the reply!
Great demo !
Managed Node.js with async / await, lots of inputs (HTTP, Auth, Analytics)... That rocks. Nice work :)
I just didn't get the "let [langs]" ; What is this syntax for ?
it's a destructuring assignment.
Say you have
let myArray = [1, 2, 3, 4];
you could use destructuring to assign each of those elements to a variable
let [a, b, c, d] = myArray;
console.log(a) // prints 1
console.log(b) // prints 2
console.log(c) // prints 3
console.log(d) // prints 4
Hey Denis! That syntax is "destructuring". It's basically just a concise way of saying that langs is equal to the first value in the array on the other side of the equal sign: babeljs.io/learn-es2015/#ecmascript-2015-features-destructuring
Ok got it thks !
I see.
Anybody know how I can get all the autocomplete suggestions his IDE provided? Also what IDE is this? Thanks.
Whenever I explicitly demonstrated using autocomplete this is WebStorm taking advantage of the TypeScript support in the Firebase SDK for Cloud Functions. If I simply typed a few characters and a large code snippet appeared it's because I chopped up my demo in TextExpander to help speed things up/reduce bugs.
This is awesome! I was just starting to write a server for my game, I just deleted my 1 day work, I will have to learn node and js though, I actually knew js years back but it looks like it changed a lot so good luck to me... I would prefer this in java but I guess its a good time to re-learn js
Does anyone know the name of the IDE he is using, thank you
He is using WebStorm with Darcula theme.
Thank you! Impressive! :)
#askfirebase I am simply pushing data to a child node on onWrite trigger.Its failing every time with following error.Please guide.
Error: Firebase.push failed: first argument contains a function in property 'users.app.firebaseInternals_.firebase_.credential.cert' with contents: function (serviceAccountPathOrObject) {
var stringifiedServiceAccount = JSON.stringify(serviceAccountPathOrObject);
if (!(stringifiedServiceAccount in globalCertCreds)) {
globalCertCreds[stringifiedServiceAccount] = new credential_1.CertCredential(serviceAccountPathOrObject);
}
return globalCertCreds[stringifiedServiceAccount];
}
Why typescript? I could not get it right away.
Nice job google, again)
the only thing that I dislike from firebase is the autentification part, for my users it will be pretty anoying if I made them log in with their google accounts and with their user/password,
Imagine trying to log in to your facebook/twiter account we enter user/password, and them we are prompted with another log in with our google accounts, it will be pretty anoying
if(firstTimeCommenting = false){console.log("ahhhhh?");}else{console.log("first time for erytang");}
Nathaniel Rowe you forgot an additional equal sign in the if statement. XD
console.log(firstTimeCommenting ? 'first time for erytang' : 'ahhhhh?');