BRIAN: Greg's coming back now, and he's
going to show you how we use GCP and Firebase together to really
modernize corporate IT apps.
Greg--
[MUSIC PLAYING]
[APPLAUSE]
GREG: Thanks, Brian.
Brian told you we're going to take an example of an existing
on-prem application.
And we're going to modernize it with Google Cloud.
Now, in this case, the app that Chris and I
are going to work with is an old ASP.NET application.
Well, that's not an ASP.NET application.
That's an ASP.NET application.
This is an application used by an insurance company.
So the adjusters go out in the field.
They take their digital camera.
They take pictures of the accidents.
They put it in their SD cards.
And then they upload the images into the application.
It's also got an API on it so that you
can manage all the images that are associated with a given
claim.
Now we're going to start bringing this application out
of the 90's and into the modern era.
We're going to start by giving our agents
a good mobile application so they don't
have to lug a laptop around.
Firebase makes that super easy.
You can build a mobile application
without having to be a back end expert.
In this case, what Chris is showing
you is the line of code that integrates
Firebase with cloud storage.
So this line of code allows the camera to take a picture.
That picture then automatically gets
uploaded into a Google Cloud Storage bucket.
So to show this is going to happen,
Chris is going to take a quick photo with the phone.
CHRIS: All right, everyone, say cheese.
I love having audiences do that.
GREG: OK.
So that photo now is being uploaded.
And it's being stored into a Google Cloud Storage bucket.
Now, to show that it really is in a GCS bucket,
we're going to switch over, we're
going to list the contents of this bucket.
Now, the Windows users among you are
going to notice that he's using PowerShell.
That's because he's using cloud tools for PowerShell.
It gives windows developers a first class experience
using Google Cloud Platform with the services that they love.
And sure enough, there's the picture.
It was just uploaded today.
So now we've got a claim picture in GCS.
How do we get it to this old legacy application?
Apogee and cloud functions make that simple.
The good news is our legacy app has an API, as I mentioned.
The bad news is the app was written over a decade ago
so it's a SOAP API.
So it's not really very friendly to modern RESTful developer
like Chris.
Apogee, however, is an enterprise API management
platform.
And we're going to start by using
it to create a proxy to convert this legacy SOAP
XML into modern JSON.
So here's the Apogee console.
We've connected it to the WSDL of the service.
I can't believe I'm saying that in 2017.
[LAUGHTER]
And on the left side you see the SOAP XML.
And on the right side, Apogee is automatically
created a much friendlier, easier for the developer
to use, JSON version of it.
Now Apogee has a lot of other capabilities.
So in addition to doing that, Chris
has applied a quota, so that we don't flood this poor service
with millions of mobile agents all trying to upload photos
at the same time.
It automatically provides throttling.
We've also put authentication in so
that only our agents and only those mobile applications
can upload the data.
Apogee has got tons more capabilities.
I am only scratching the surface.
But for our purposes that's good enough for this application.
So we got images in a bucket.
We got our application that's now
got a nice modern API on it.
How do we connect the two?
Well, I could deploy a VM, but that's overkill, right?
All I want to do is copy a little file from GCS to an API.
Why should I pick an operating system and have to patch the OS
and deploy a big heavy VM image?
Cloud functions allows me to just write
a snippet of JavaScript.
This JavaScript is listening to that GCS bucket.
So anytime a file gets added, this snippet gets invoked.
And if it goes down, you'll see he's
using the post method, that nice RESTful interface,
onto our web service.
So now when Chris takes a picture,
we should see the picture go all the way through.
Now, I don't have a car crash on stage, Chris.
I think you've got though some sort
of a next best thing for us.
CHRIS: Actually, what I'm prepared to do,
Greg, is, I've got some scale model vehicle replicas here
that I'm going to use to simulate a high speed collision
scenario.
GREG: This is scaled down into--
CHRIS: Exactly right.
GREG: Very good.
CHRIS: You're ready?
GREG: Yeah, go for it.
CHRIS: [SOUNDS OF A CAR CRASH]
[APPLAUSE]
GREG: Please tell me you didn't misplace the phone.
So he's going to take the picture of-- oh, the humanity.
And it gets uploaded.
And now he's going to switch back
to our application, our corporate app.
He's going to hit F5 because it's the 90s
and we have to refresh.
And there we go.
There's our application.
[APPLAUSE]
We started with the legacy on-prem app.
We used Firebase to build a mobile application that didn't
even require a back end expert.
We wrapped the old SOAP API and modern JSON and cloud functions
with this wonderful glue layer to connect everything together.
But one more thing, this application
started as an on-prem application.
And we've wrapped it with all this amazing cloud stuff,
but it's still sitting on-prem.
Let's fix that bug too.
With just a couple of clicks, Chris
will start the the Migration Wizard and in about 45 minutes
we will live migrate this running service
into Google Cloud Platform, where
it runs on Google's amazing infrastructure network
operations and reliability.
And now we've really taken this app
and brought it into the modern era.