[MUSIC PLAYING]
[APPLAUSE]
DOUG STEVENSON: Hey, everybody.
My name is Doug Stevenson with the Firebase team.
Welcome to "Meet Firebase," where
you get to meet the Googlers who make Firebase happen.
Our guest tonight is with the Firebase Cloud Messaging team.
He's a developer program engineer,
and his name is Matt Gaunt.
Matt, would you join me on the show?
MATT GAUNT: Thank you for having me.
DOUG STEVENSON: Great to have you on the show.
So Firebase Cloud Messaging for Web just launched.
Tell me, how did that go?
MATT GAUNT: Yeah.
It was great.
It was kind of interesting because it's
the first time the Firebase SDK has
been used in service workers, which
is-- it's kind of a new thing in the web
world at the moment, where you can run JavaScript
without the browser or the web page being open.
It's been really great just working
with the JavaScript team for Firebase
and just figuring out how we can add this in
and working with them and making sure everything
works in this new service worker environment.
And everyone was just like, yeah, we need to do this.
We need to get landed.
And everyone was just super helpful.
It was great.
DOUG STEVENSON: This is our first time actually meeting
in person.
So the first time I saw you was with your video
about FCM-- Firebase Cloud Messaging-- for the web.
MATT GAUNT: Yes, one more viewer.
DOUG STEVENSON: Yeah.
Mark one.
I want to ask you about that later.
I've been living in the San Francisco Bay
area for a few years now.
I moved here from Boston.
But I understand you moved here from where?
MATT GAUNT: From London, UK.
DOUG STEVENSON: So that's a pretty big move.
How's that gone?
MATT GAUNT: Good so far.
It's only been three months.
And it's kind of like out of one fire, into the other.
Because we literally-- I moved, and then I
started work on FCM-- the web SDK side
of things-- almost immediately.
DOUG STEVENSON: Wow.
Getting right to work.
Well, how have you been settling in to the San Francisco Bay
area?
MATT GAUNT: Good so far.
It's America, and, obviously, it's
an English-speaking country.
It's not like when you go traveling or whatever else.
There's only certain small cultural things
that are different.
But it's nice.
And doing lots of random things, like San Francisco Zoo
and seeing the red pandas there and different things
like that that probably, if you lived here,
you're like, oh my god, that's so touristy it hurts.
DOUG STEVENSON: When we talked last time,
you mentioned that you were looking into an activity called
glamping.
MATT GAUNT: Yeah.
DOUG STEVENSON: That was the first time
I had heard that word.
So tell me, what is glamping?
MATT GAUNT: So glamping-- I think
it's meant to be glamorous camping, or glamour camping.
Basically, it's a cop out for real camping,
where you actually have to turn up and pitch your own tent.
It's like, you just rock up, and someone has a tent there.
And then they feed you food for breakfast in the morning.
And it was really nice.
We went the other weekend.
And you wake up, and you're overlooking the sea,
and it's all nice and coastal.
And you just get to see all the bright stars and everything
else at night because there's no clouds, like in London.
The worst of it was they even had a fire,
and then they would make the s'mores for you.
So it was just like, everything was taken care of.
You didn't have to even think, which was great.
DOUG STEVENSON: I'll have to give that a try some time
because I'm not very outdoorsy.
So glamping might be for me if I get to keep
some of my city trappings.
MATT GAUNT: Yeah.
DOUG STEVENSON: It turns out, because I
like to stay indoors and play video games,
that I got pretty good at playing plastic instruments
through video games.
But you told me you play actual guitar.
Is that right?
MATT GAUNT: Yes.
I used to play electric guitar quite a lot.
Back in college, we had a little mini band,
and we did charity concerts.
And it was just all covers and, basically, any excuse
to make lots of loud noises.
I'm pretty sure I've kind of damaged my hearing quite
savagely from this point.
But yeah, it's really good fun.
Nowadays, it's much more calm and I'm just--
whenever I get a little bit of down time or my computer
is playing up or I'm installing a new version of an OS, that's
the point I'll pick up the guitar and just be like,
oh, I'll just play a couple of things.
DOUG STEVENSON: I see.
So you're just filling in time.
MATT GAUNT: Yes.
Exactly now.
DOUG STEVENSON: OK, I'm going to fill a little bit of time,
and I'm going to play a plastic guitar right now.
MATT GAUNT: Are you going to serenade me?
DOUG STEVENSON: Yeah.
MATT GAUNT: Serenade, serenade.
[APPLAUSE]
DOUG STEVENSON: I'm going to put this thing on right here.
I might even just stand up a bit here.
So the way it goes is-- now, I have to picture
falling bricks on a TV screen in order to be able to play this.
That's how I get in the mood.
But I'm going to start out, and I'm just
going to play a little tune.
[MOUTHS GUITAR SOUNDS]
It goes something like that.
And then I take it off, and I just--
MATT GAUNT: Smash it.
DOUG STEVENSON: --beat something up with it.
Yeah.
MATT GAUNT: Nice.
DOUG STEVENSON: That's how I do it.
But it turns out, we have a real guitar here.
MATT GAUNT: No, you don't.
DOUG STEVENSON: If you would like to play that,
I think our audience would love to see that.
MATT GAUNT: Oh, there we go.
SPEAKER: All right.
DOUG STEVENSON: So, Matt, would you care to play us a song?
MATT GAUNT: Oh, so this is what the speaker's for.
Oh.
DOUG STEVENSON: Yeah, yeah.
MATT GAUNT: I don't want to do this.
DOUG STEVENSON: But you're doing it right now.
Here we go.
MATT GAUNT: I'm just going to go for the simplest thing
because it's just easy.
DOUG STEVENSON: Do some power chords.
[MUSIC - MATT GAUNT, "SMELLS LIKE TEEN SPIRIT"]
MATT GAUNT: Yeah.
DOUG STEVENSON: No, that's very good.
Thank you.
MATT GAUNT: I did not want to do that.
DOUG STEVENSON: Yeah.
How about that?
Maybe you could teach something to our band director, Nate,
over here, who's learning some instruments.
NATE: Let's rock.
DOUG STEVENSON: He has to work on his musical abilities
a little bit.
NATE: Drop the Firebase line, bros.
DOUG STEVENSON: All goofing aside,
Firebase Cloud Messaging is available for web apps
now, which is kind of a big deal, isn't it?
MATT GAUNT: Yeah.
So, basically, the backstory of all this
was I used to-- I was working with a lot of the Chrome
engineering team in London and working with Web Push and just
the native support in browsers, which is still fairly new.
I think it's like a year old, which sounds like a long time,
but you got to go through spec process
and get all the browsers to implement and stuff.
And one of the biggest issues there was you
have to encrypt all the messages that you send.
Any payload has to be encrypted before you send it,
and then you can only send it to one device, not to lots.
And you miss certain features, like topic support,
which FCM has had baked in for a long time now.
So what the FCM web SDK now has is support,
where you can just register for an FCM
token and it will use Web Push behind the scenes.
But all the complicated stuff happens on the back end,
and you're removed from it, to a certain extent.
And it makes everything a lot easier.
DOUG STEVENSON: Yeah, that's great.
Also, FCM was only previously supported on Android and iOS.
And now for the web, which brings all
three platforms closer in parity to what we want to offer.
MATT GAUNT: Yeah, exactly.
And it's nice because if you have a back end that's already
taking FCM tokens and sending messages, now
you can just add web onto it, rather than have
to worry about building an entirely new push
infrastructure just for web.
Instead, you can just put all three under the same roof
on your back end, which is great.
DOUG STEVENSON: That sounds like it'd
be very helpful for developers.
And for those of you watching, if you
want to watch Matt's video, he'll
give you an introduction on how to get
started with FCM for the web.
MATT GAUNT: Yep.
Nice, quick, simple getting started intro.
I like the fact that you're upselling my video.
Again, more views.
DOUG STEVENSON: Views are good, right?
So be sure to click that link in the description.
And I have a game to play if you want to do that real fast.
MATT GAUNT: Oh, yeah.
Because you haven't given me enough surprises.
DOUG STEVENSON: No, no.
Not enough surprises.
So I call this game Good Cloud Message, Bad Cloud Message.
MATT GAUNT: Oh, god.
DOUG STEVENSON: And here's a series of questions.
Let's do them one at a time.
And we'll show them up on the screen
for everyone watching at home.
So your job is to tell me-- I'll read it out loud.
You tell me is this a good message or is it a bad message.
Don't read ahead.
MATT GAUNT: What?
Oh, OK.
DOUG STEVENSON: We're doing one at a time.
MATT GAUNT: I thought I was going to pick my answers.
DOUG STEVENSON: No, no, no.
I'm going to ask you for all these.
So imagine there's a message comes up
and it says, there are 12 new updates
from your subscriptions.
MATT GAUNT: 12 new--
DOUG STEVENSON: Yeah.
Is that a good message or a bad message?
MATT GAUNT: I guess it depends on what the subscriptions are.
My gut instinct is like, maybe it will be OK?
DOUG STEVENSON: But it's subscriptions
the user asked for.
MATT GAUNT: Yeah, so I'm guessing it's good.
DOUG STEVENSON: It's probably good, yeah.
It is a subscription.
MATT GAUNT: Yeah.
I imagine, with an icon and everything else, I'd get it
and it would be sweet.
So yes-- good.
DOUG STEVENSON: OK.
So the next one simply says, an error occurred
and a frowny face.
MATT GAUNT: Well, we all know that's bad
because it's completely not for the user in any way, shape,
or form.
It's like, great.
What do I do with that information?
Swipe, close, maybe even deny permission
to send me more notifications.
So yeah.
DOUG STEVENSON: Yeah.
Yeah.
So I mean, what happens if you click this?
I don't know, but it's not helpful.
OK, next question is, your order is about to arrive.
Please be ready to answer the door, with the assumption
that the user did actually order something using whatever--
MATT GAUNT: That would be hella creepy if it wasn't.
It's just like, by the way, we're coming for you.
It's like, no.
Yeah, useful.
Easily useful.
I like it.
DOUG STEVENSON: Yeah.
Yeah.
It tells you exactly what's happening at the time it's
happening, presumably.
OK.
So how about-- this next one is, celebrate with us at Punk.ly!
It's Independence Day-- three exclamation points.
And then there is-- and I'll break this down--
some party favors, a balloon, a popped champagne bottle--
MATT GAUNT: A couple of pints.
DOUG STEVENSON: --a couple of beers.
Yeah.
A variety of drinks, two capsules--
who knows what's in that?
A burrito-- also don't know what's in that--
and a flashing camera.
Is this a good message or a bad message?
What do you think?
MATT GAUNT: I'd say it's a bad message.
It feels pretty spammy, to a certain extent,
unless you really freaking love Punk.ly, whatever Punk.ly is.
DOUG STEVENSON: Yeah, we don't know what it is, but--
MATT GAUNT: I'm going to say no.
DOUG STEVENSON: I think it's a little bit spammy, too.
If I got this, I wouldn't know what to do with it.
MATT GAUNT: Well, you're kind of like,
I know it's Independence Day.
It's like, maybe if it was a special offer for Punk.ly
and it's like, you can get special entry
with this voucher-- maybe?
DOUG STEVENSON: Maybe.
But why wouldn't it just say that, right?
MATT GAUNT: Well, exactly.
That's the thing.
This is a bad message if that's the case.
DOUG STEVENSON: Yeah.
We'll just say it's a bad message.
And the last question we have-- or the last message
we have here is, you have 23 new messages from Nate.
NATE: What's up, dudes?
MATT GAUNT: Yeah, I guess it's OK.
I mean, it would be better if I knew-- well,
I guess if it's 23 new messages, then, yeah,
they can't tell me what the messages are, but--
DOUG STEVENSON: Yeah, there's not enough room
to put that in a message.
So it turns out this looks like a good message,
but it's actually not a good message.
MATT GAUNT: What?
DOUG STEVENSON: Because Nate over
there sends me all these forwards of funny emails
and internet jokes and whatever.
And I'm sick of it.
I don't want it.
I don't want these messages anymore.
So it's a bad message.
MATT GAUNT: Why isn't Nate sending me any messages,
god dammit?
DOUG STEVENSON: Well, I'll give him your email address
if you want to be on his list.
I wouldn't recommend it.
MATT GAUNT: He looks like he has great taste in comedic emails.
DOUG STEVENSON: He also has great taste in bananas, but--
NATE: Hey, don't touch my 'nanas.
MATT GAUNT: Love it.
DOUG STEVENSON: Thanks for being on the show, Matt.
MATT GAUNT: Thank you for having me.
DOUG STEVENSON: It was great having you.
Be sure to check out his video.
Click the link in the description below.
Unfortunately, that's all we have time for.
Be sure to stay tuned here on the Firebase YouTube channel.
See you next time on "Meet Firebase."
[MUSIC PLAYING]
[APPLAUSE]
NATE: [SNORES]