SlideShare a Scribd company logo
1 of 46
Focus on Gameplay, not
Infrastructure
Ian Lewis
ianlewis@google.com
Confidential & ProprietaryGoogle Cloud Platform 2
Confidential & ProprietaryGoogle Cloud Platform 3
Confidential & ProprietaryGoogle Cloud Platform 4
Confidential & ProprietaryGoogle Cloud Platform 5
Confidential & ProprietaryGoogle Cloud Platform 6
Confidential & ProprietaryGoogle Cloud Platform 7
Confidential & ProprietaryGoogle Cloud Platform 8
Is there a better way?
Confidential & ProprietaryGoogle Cloud Platform 9
Firebase is a powerful platform for
mobile and web applications.
Confidential & ProprietaryGoogle Cloud Platform 10
Firebase
User
Authentication
Realtime
Database
Static
Hosting
Confidential & ProprietaryGoogle Cloud Platform 11
Confidential & ProprietaryGoogle Cloud Platform 12
Firebase
User
Authentication
Realtime
Database
Static
Hosting
Confidential & ProprietaryGoogle Cloud Platform 13
Firebase
User
Authentication
Realtime
Database
Static
Hosting
Confidential & ProprietaryGoogle Cloud Platform 14
Location Collaboration Gaming
Realtime is…
Confidential & ProprietaryGoogle Cloud Platform 15
Location Collaboration Gaming
Realtime is…
http://tinyurl.com/FireDraw
Confidential & ProprietaryGoogle Cloud Platform 16
Location Collaboration Gaming
Realtime is…
Confidential & ProprietaryGoogle Cloud Platform 17
Unreliable networks Multi Platform
Realtime is hard!
Complex Transport
Confidential & ProprietaryGoogle Cloud Platform 18
Unreliable networks Multi Platform
Realtime is hard!
Complex Transport
Confidential & ProprietaryGoogle Cloud Platform 19
Unreliable networks Multi Platform
Realtime is hard!
Complex Transport
Confidential & ProprietaryGoogle Cloud Platform 20
3 tier Architecture
Device API Server Database
Confidential & ProprietaryGoogle Cloud Platform 21
2 tier Architecture
Firebase
● Fast Development
● Scalability
Device
Confidential & ProprietaryGoogle Cloud Platform 22
2 Tier Architecture
Server
API
FirebaseDevice
Confidential & ProprietaryGoogle Cloud Platform 23
Development
Confidential & ProprietaryGoogle Cloud Platform 24
Google Authentication
private void getGoogleOAuthTokenAndLogin() {
AsyncTask<Void, Void, String> task = new AsyncTask<>() {
@Override
protected String doInBackground(Void... params) {
String scope = String.format("oauth2:%s", Scopes.PLUS_LOGIN);
String token = GoogleAuthUtil.getToken(this,
Plus.AccountApi.getAccountName(mGoogleApiClient), scope);
return token;
}
...
Confidential & ProprietaryGoogle Cloud Platform 25
Google Authentication
...
@Override
protected void onPostExecute(String token) {
Intent intentWithToken = new Intent(this,
OfficeMoverActivity.class);
intentWithToken.putExtra(AUTH_TOKEN_EXTRA, token);
startActivity(intentWithToken);
}
}
Confidential & ProprietaryGoogle Cloud Platform 26
Google Authentication
mFirebaseRef.authWithOAuthToken("google", authToken, new
Firebase.AuthResultHandler() {
@Override
public void onAuthenticated(AuthData authData) {
Log.v(TAG, "Auth success");
}
@Override
public void onAuthenticationError(FirebaseError firebaseError) {
Toast.makeText(getApplicationContext(),
"Auth failed. Please try again",
Toast.LENGTH_SHORT).show();
}
});
Confidential & ProprietaryGoogle Cloud Platform 27
Offline
var amOnline = new Firebase('https://<YOUR-FIREBASE>.firebaseio.com/.
info/connected');
var presenceRef = new Firebase('https://<YOUR-FIREBASE>.firebaseio.
com/presence/'
+ userid);
amOnline.on('value', function(value) {
if (value.val() === true) {
// Connected (or reconnected)!
presenceRef.onDisconnect().set(false); // one off, has to be reregistered
presenceRef.set(true);
}
});
Confidential & ProprietaryGoogle Cloud Platform 28
Reading Data
Firebase ref = new Firebase("https://<your-firebase>.firebaseio.com");
ref.child("background").addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
System.out.println(dataSnapshot.getValue()); // prints “grid”
}
@Override public void onCancelled(FirebaseError error) { }
});
Confidential & ProprietaryGoogle Cloud Platform 29
Reading Data
Firebase ref = new Firebase("https://<your-firebase>.firebaseio.com");
ref.child("background").addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
System.out.println(dataSnapshot.getValue()); // prints “grid”
}
...
});
Confidential & ProprietaryGoogle Cloud Platform 30
Writing Data
Firebase ref = new Firebase("https://<your-firebase>.firebaseio.com");
ref.child("background").setValue("grid");
Confidential & ProprietaryGoogle Cloud Platform 31
Writing Data
{
"background": ”grid”
}
Confidential & ProprietaryGoogle Cloud Platform 32
Writing Data
OfficeThing newThing = new OfficeThing();
newThing.setName(“Don Quixote”);
ref.child("object").setValue(newThing);
Confidential & ProprietaryGoogle Cloud Platform 33
Writing Data
{
"object" : {
"name" : "Don Quixote",
}
}
01 / 23
Demo
Confidential & ProprietaryGoogle Cloud Platform 35
In the wild…
Confidential & ProprietaryGoogle Cloud Platform 36
CBS
50,000
concurrent
users
27,000,000
chat
messages
Confidential & ProprietaryGoogle Cloud Platform 37
Twitch.tv is the world's
leading video platform
and community for
gamers, and uses
Firebase to notify
users when a realtime
stream goes live.
Confidential & ProprietaryGoogle Cloud Platform 38
Where we used to
spend 50% of our
development time
building the backend,
we can focus now
95% of our time on the
actual application.
“
”
Confidential & ProprietaryGoogle Cloud Platform 39
200,000+
Developers
Confidential & ProprietaryGoogle Cloud Platform 40
Focus on Gameplay
Confidential & ProprietaryGoogle Cloud Platform 41
Mobile is
Important!
Confidential & ProprietaryGoogle Cloud Platform 42
Traditionally
Complex!
Confidential & ProprietaryGoogle Cloud Platform 43
Confidential & ProprietaryGoogle Cloud Platform 44
Confidential & ProprietaryGoogle Cloud Platform 45
https://firebase.com
Confidential & ProprietaryGoogle Cloud Platform 46
Thank you!
This work is licensed under a Creative Commons Attribution 2.0 Generic License.

More Related Content

What's hot

Introduction to Google Compute Engine
Introduction to Google Compute EngineIntroduction to Google Compute Engine
Introduction to Google Compute Engine
Colin Su
 

What's hot (20)

Google Compute Engine Starter Guide
Google Compute Engine Starter GuideGoogle Compute Engine Starter Guide
Google Compute Engine Starter Guide
 
Introduction to Google Compute Engine
Introduction to Google Compute EngineIntroduction to Google Compute Engine
Introduction to Google Compute Engine
 
Google Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your ProductGoogle Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your Product
 
Big data on google cloud
Big data on google cloudBig data on google cloud
Big data on google cloud
 
#DataUnlimited - Google Big Data Unlimited
#DataUnlimited - Google Big Data Unlimited#DataUnlimited - Google Big Data Unlimited
#DataUnlimited - Google Big Data Unlimited
 
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
 
Google Compute Engine
Google Compute EngineGoogle Compute Engine
Google Compute Engine
 
TIAD : Automate everything with Google Cloud
TIAD : Automate everything with Google CloudTIAD : Automate everything with Google Cloud
TIAD : Automate everything with Google Cloud
 
Google Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowGoogle Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlow
 
PuppetConf 2017: Zero to Kubernetes -Scott Coulton, Puppet
PuppetConf 2017: Zero to Kubernetes -Scott Coulton, PuppetPuppetConf 2017: Zero to Kubernetes -Scott Coulton, Puppet
PuppetConf 2017: Zero to Kubernetes -Scott Coulton, Puppet
 
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
 
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
 
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
 
Integrating Google Cloud Dataproc with Alluxio for faster performance in the ...
Integrating Google Cloud Dataproc with Alluxio for faster performance in the ...Integrating Google Cloud Dataproc with Alluxio for faster performance in the ...
Integrating Google Cloud Dataproc with Alluxio for faster performance in the ...
 
Top Advantages of Using Google Cloud Platform
Top Advantages of Using Google Cloud PlatformTop Advantages of Using Google Cloud Platform
Top Advantages of Using Google Cloud Platform
 
Google Cloud Networking Deep Dive
Google Cloud Networking Deep DiveGoogle Cloud Networking Deep Dive
Google Cloud Networking Deep Dive
 
Google Cloud Connect Korea - Sep 2017
Google Cloud Connect Korea - Sep 2017Google Cloud Connect Korea - Sep 2017
Google Cloud Connect Korea - Sep 2017
 
[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API
 
Google Cloud Dataflow
Google Cloud DataflowGoogle Cloud Dataflow
Google Cloud Dataflow
 
Introduction to Google Cloud Platform
Introduction to Google Cloud PlatformIntroduction to Google Cloud Platform
Introduction to Google Cloud Platform
 

Similar to GCP Gaming 2016 Seoul, Korea Firebase

Similar to GCP Gaming 2016 Seoul, Korea Firebase (20)

Firebase
FirebaseFirebase
Firebase
 
Android Meetup Slovenia #2 - Making your app location-aware
Android Meetup Slovenia #2 - Making your app location-awareAndroid Meetup Slovenia #2 - Making your app location-aware
Android Meetup Slovenia #2 - Making your app location-aware
 
Infinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-aware
 
Building with Firebase
Building with FirebaseBuilding with Firebase
Building with Firebase
 
Angular 4 with firebase
Angular 4 with firebaseAngular 4 with firebase
Angular 4 with firebase
 
Firebase with Android
Firebase with AndroidFirebase with Android
Firebase with Android
 
Introduction to Firebase on Android
Introduction to Firebase on AndroidIntroduction to Firebase on Android
Introduction to Firebase on Android
 
Using Java to interact with Firebase in Android
Using Java to interact with Firebase in AndroidUsing Java to interact with Firebase in Android
Using Java to interact with Firebase in Android
 
2015 akure gdg dev fest
2015 akure gdg dev fest2015 akure gdg dev fest
2015 akure gdg dev fest
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Firebase overview
Firebase overviewFirebase overview
Firebase overview
 
Lecture 11 Firebase overview
Lecture 11 Firebase overviewLecture 11 Firebase overview
Lecture 11 Firebase overview
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applications
 
Google Play Services Rock
Google Play Services RockGoogle Play Services Rock
Google Play Services Rock
 
iOSDevCamp Firebase Overview
iOSDevCamp Firebase OverviewiOSDevCamp Firebase Overview
iOSDevCamp Firebase Overview
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
 
Launching Beeline with Firebase
Launching Beeline with FirebaseLaunching Beeline with Firebase
Launching Beeline with Firebase
 
What is new in Firebase?
What is new in Firebase?What is new in Firebase?
What is new in Firebase?
 
Firebase & SwiftUI Workshop
Firebase & SwiftUI WorkshopFirebase & SwiftUI Workshop
Firebase & SwiftUI Workshop
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and Firebase
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

GCP Gaming 2016 Seoul, Korea Firebase