ALEXIS MOUSSINE POUCHKINE: Hello, everyone.
We're here at Devoxx 2014.
And I'm here with Mandy.
Hello, Mandy.
MANDY WAITE: Hey, Alexis.
How are you doing?
ALEXIS MOUSSINE-POUCHKINE: And we're
here to talk about something I'm very excited about personally.
I think Mandy, you are as well.
Which is Firebase as a solution for backends
for a lot of things, but mobile apps
is probably a pretty good sweet spot.
Firebase is this company which has joined the Google Cloud
family recently and which offers a-- I don't
know if you can call it a mobile backend as a service.
But something where basically you have a lot of features
that people are looking for when they're building mobile apps,
or web apps actually, without touching the backend,
without spending time on infrastructure.
Is that a fair assessment?
MANDY WAITE: Yeah, I think whenever
we're talking about Firebase, we tend to always circle back
to mobile as being the priority and the most interesting place
where we can use Firebase today.
Certainly we can do web applications as well with it.
But, yeah, mobile is definitely the sweet spot.
ALEXIS MOUSSINE POUCHKINE: Right.
So talking about mobile applications,
we're trying to address a space where
we need to have massive scale in the backend.
And as a mobile developer, you spend enough time
writing your mobile app.
And life's too short to write a backend.
And you probably don't want to get
into all the nitty-gritty details of putting together
an architecture and an infrastructure
to support that back end.
So how does Firebase address maybe real-time communication?
Because that's typically what you want in mobile apps.
What are the key features that Firebase has to offer?
MANDY WAITE: So I think the guys from Firebase
would refer to their product as a real-time application
platform.
It effectively allows client devices, application clients
running on web or running on mobile to effectively
communicate and share data with the Firebase servers running
the backend, to provide authentication services
as well.
But also, most importantly, to be
able to share data between other connected devices as well.
It could also be that the user can access that state
from one device to another.
But most importantly, that sweet spot, again,
is where data that's stored from one device
will be pushed out to the Firebase servers
and then pushed out to any other interested clients
in real time.
ALEXIS MOUSSINE-POUCHKINE: So can you
say more about real time?
Real time means different things to different people.
MANDY WAITE: Yeah, so, I had this kind of problem
as well when I first got introduced to Firebase.
What does real time mean?
Because I come from a background where real time would
mean stock tickers, that kind of thing
where we need to have things really quickly.
So effectively it's data being shared and pushed
out to other devices in milliseconds,
but also without any kind of requirement in the client side
to actually go and get the data.
So the data will become available,
will be updated on the Firebase servers,
and will be instantaneously pushed out
to all of the other devices that are interested in that data.
ALEXIS MOUSSINE POUCHKINE: Right.
So typically when you talk about data,
it's payloads of JSON data that's being sent,
notifications go out.
On the client side how does it work?
Do I register callbacks?
Do I just get notifications for free when I use the client
library offered by Firebase, , again to build an Android app?
How does it work?
MANDY WAITE: Well, yeah, so it's very simple
to get a connection to Firebase servers.
We have various different ways of doing it.
In JavaScript, it's a fairly simple declaration,
same with Android.
Once you have a reference to the Firebase servers,
you can very simply make calls to that reference.
And effectively what you're doing behind the scenes
is making a RESTful call to the Firebase servers.
Fully authenticated, everything controlled.
ALEXIS MOUSSINE-POUCHKINE: So one
of the challenges in the mobile world
is that connections are unreliable.
And certainly here where a number of the speakers
are not in their home country, they
might or might not have roaming.
And certainly they cannot rely on Wi-Fi, for example.
MANDY WAITE: Yeah, definitely.
ALEXIS MOUSSINE-POUCHKINE: So that's
one of the many use cases where that's how life is.
You don't have connectivity 100% of the time.
So does Firebase have anything to help with that?
MANDY WAITE: Yeah, so this is one of the real challenges.
Effectively with Firebase having their own servers and client
devices running applications, we can get ourselves
into a situation where we have distributed state.
A state that is available in clients
but has not been synchronized with the servers.
And a state that's on the servers that's
not been synchronized with all of the clients.
So effectively, we have this distributed state problem.
Firebase handles that effectively
by storing data locally.
So whenever you make a change to data,
it's pushed out to locally store.
And the application-- event handlers are fired as required.
And the application can carry on doing what it does.
And at any point, it would just connect to that point.
At any point in the future when we become connected back
to the Firebase servers, that data
can be synchronized and pushed back out again.
At that time, all other interested clients
would also get updates.
ALEXIS MOUSSINE-POUCHKINE: So we talked about web or Android
in the case of mobile, but Firebase is really
a solution that spans across a number of technologies.
So just for the web, I was looking at the website.
And there a lot of SDKs and [? findings-- ?]
or I don't know how you call this--
for all of the popular JavaScript frameworks
out there, so Angular, Ember and a few others.
MANDY WAITE: And Polymer as well.
ALEXIS MOUSSINE POUCHKINE: Polymer
as well, which is the newer one.
It supports iOS as well.
So there's an Objective-C client library.
MANDY WAITE: Yeah, so there's an Objective-C client library.
You have support for iOS, for Windows, for JavaScript
effectively.
Java support's really-- by virtue
of being available on the Android.
ALEXIS MOUSSINE-POUCHKINE: Can you use this at the REST API?
You mentioned there was a REST API that--
MANDY WAITE: Yeah, so effectively every single bit
of data that you store in Firebase
can effectively be accessed via a URL.
So you can access your data sets completely via a URL.
Or you can access individual bits of data
by URLs as well in a completely RESTful way.
ALEXIS MOUSSINE-POUCHKINE: OK.
So you also mentioned user management and authentication.
How does that work?
Does it support only Google Gmail accounts or--
MANDY WAITE: No.
That's a great thing.
So it doesn't just support Google,
which would've been a concern, I think.
It supports email and password.
So you can set up very basic email and password
if you choose to.
It supports out of the box four authentication providers.
It supports Twitter, GitHub, Facebook, and Google.
And if you have another requirement,
maybe to attach to your own LDAP servers or active directory.
You can effectively roll your own and use custom auth tokens
to connect to those authentication providers.
ALEXIS MOUSSINE POUCHKINE: Great.
So I have to say it again, I'm very
excited about this Firebase joining the Cloud platform.
What can we expect from that fairly recent acquisition
from Google in terms of integrating
as part of the bigger family?
So I understand the Firebase [INAUDIBLE] brand
will stick around.
Any integration that we can share?
MANDY WAITE: Well, I think one thing
that the guys from Firebase did announce last week at Google
Cloud Platform Live was the advent of triggers.
And triggers will be used effectively
to fire off events whenever data is touched
or updated, which could allow us to-- it's effectively
a call to a Webhook.
And a Webhook could be an App Engine application.
It could be a virtual machine running on Google Compute
Engine.
It could be running somewhere else completely,
not on Google Cloud Platform at all.
Effectively just a call to a Webhook.
So I think that's really exciting.
That will effectively allow us to be
able to have hooks into Firebase whenever data changes
and invoke functionality outside of Firebase.
That's the first step that I'm aware of.
ALEXIS MOUSSINE-POUCHKINE: It's probably also worth
mentioning that we're not requiring people now
to use the Google Cloud Platform just
to use Firebase as they were before.
MANDY WAITE: Yeah, and I'm hoping that stays that way.
At the moment, you just sign up for Firebase.
It's got a free plan, a free tier.
It's got a very simple tutorial.
It's so remarkably easy to get up and running with it.
It's quite surprising.
You can be expecting to be asked for your credit card,
but it's pretty straightforward.
Get in there, get playing with it,
and get started very quickly.
It also has its own debugging tool
called Forge, which allows you to [? see the updates ?]
to your data in real time.
ALEXIS MOUSSINE POUCHKINE: Right.
And I've heard good things about the documentation.
So I guess it's all good.
So, guys, if you haven't checked out Firebase already,
I would encourage you to do so.
Whether you're building web applications,
mobile applications, I think it's certainly worth
checking out.
So thank you, Mandy.
MANDY WAITE: Thank you, Alexis.
ALEXIS MOUSSINE POUCHKINE: That's all the time we have.
For further information, go to firebase.com,
for the time being at least.
And check out Mandy's session here
at Devoxx, which will be available on [INAUDIBLE].
MANDY WAITE: [INAUDIBLE] Thank you.
Cheers.
ALEXIS MOUSSINE POUCHKINE: Bye bye.
MANDY WAITE: Bye-bye.