Google End points pour vos applications Android par Didier Girard 3 avril 2013

Preview:

DESCRIPTION

 

Citation preview

Google Cloud Endpoints and Plateform@DidierGirard

Barcamp

Le 28 Mars 2009 de 10h00 à 17h30 à La Cantine

Nous l'avons fait !

Software Development Experts

www.abonentendeur.com

La Team

Didier GirardDéveloppeur/Designer

Un développeur Back End fait du Front End

La TeamBenoit SparzaDesigner

Didier GirardDéveloppeur

Un développeur Back End fait du Front Endavec un infographiste

La TeamBenoit SparzaDesigner

Guillaume Le RoyDéveloppeur Android

Didier GirardDéveloppeur AppEngine

Lancement le 28 mars 2013 de ABEmoto 1.1.0 (GA)

Bonus

La TeamBenoit SparzaDesigner

Guillaume Le RoyDéveloppeur Android

Didier GirardDéveloppeur AppEngine

A TrouverCommunity Manager

Plan

● REST● Cloud EndPoints● Cloud Plateform

REST

REST : Roy Fielding

PhD

Roy

2000

NetworkSoftwareArchitecture

Qui utilisent REST ?

REST : communication entre ordinateurs

REST : Architecture de votre application

REST : Tout est une ressource accessible via une URI

Deux types d'URL

● Une URL pour les collections○ /users

● Une URL pour les éléments○ /users/2314R5

REST : Sans Etat

REST != Statefull

REST : 4 Actions Standards

POST

DELETEPUT

GET

REST : 4 Actions Standards

CREATE

DELETEUPDATE

READ

REST : 4 Actions Standards

Ressource POSTcreate

GETread

PUTupdate

DELETEdelete

/usersCrée un nouvel

utilisateur Liste les

utilisateursMAJ de masse

Supprime en masse

/users/2314R5 Erreur ! Récupère un user

Updateou Erreur !

Delete un user

Codes Retours : de 200 à 404

Versioning

/v1/users

Authentification

Représentation des ressources

html, json, xml,...

Cloud Endpoints

Objectifs de Endpoints

Objectif

Construire une application multi-clients

Objectif

qui monte en charge

Objectif

en s'appuyant sur la plateforme Cloud de Google

Architecture

Cloud Endpoints ?

● REST-based APIs● AppEngine backend

○ Python et JAVA ● Client-libraries for many Platforms

○ Android, iOS, JS○ Python, Dart, PHP, ...

● Même infrastructure que les "nouvelles" APIs Google○ Google+, Drive, YouTube v3, ...

● En progression permanente

Demo

● GET, POST, PUT● OAuth2● Client Android

Quick Start avec leCloud Google

Didier Girard Alexis MPSfeir Google

@DidierGirard @alexismp

Vous devez développer QuizzMyZik

QuizzMyZik est un jeu pour téléphone mobile où les joueurs doivent trouver le plus rapidement possible

le titre et l'artiste d'un morceau.

?

Les défis techniques

● Etre multicanal● Etre sécurisé● Proposer du stockage massif● Proposer du data analyse● Encaisser des pics de charge cycliques● Générer des diplômes au format pdf et les

envoyer par email

Architecture cible

APIBusiness

Search Server

NoSQLData Mining

High Capacity Storage

Mobile

Tablette

Machine

Browser

Authentification

Serveur Impression

Serveur SMTP

BI

Architecture cible

APISpark

Serveur d'applications

ElasticSearch

Hadoop/HbaseMahout

High Capacity Storage ?

Mobile

Tablette

Machine

Browser

OAuth

Serveur Impression ?

Serveur SMTP ?

Base OLAP

Architecture cible

Cloud EndPoints

AppEngineSearch API

DataStorePrediction

Cloud Storage

Mobile

Tablette

Machine

Browser

Google Accounts Authentication and

Authorization

Print via Compute Engine Mail API

BigQuery

Google Cloud Platform

Exemple de débit

Cloud EndPoints

AppEngineSearch API

DataStorePrediction

Cloud Storage

Mobile

Tablette

Machine

Browser

Google Accounts Authentication and

Authorization

Print via Compute Engine Mail API

BigQuery

Google Cloud Platform

30Mo

La plateforme Google

Google Cloud Platform

Google Cloud Platform

Tout pour simplifier la vie du développeur

App Engine

Easy to buildEasy to scale

Demo

Prototypage facileMaven facileTraffic splitting

Datastore, CloudSQL

Easy to persist

Search API

Easy to search

Add Google-like full-text search to your application● Custom scoring and snippeting● GeoSearch

Cloud Storage API

Easy to storeEasy to shareEasy to stream

From 0 to 5 TB per Object

BigQuery

Easy to Query

BigQuery gives you this power

Store data with reliability,redundancy and consistency

Go from data to meaning

Quickly!

At scale ...

How are developers using it?

Game and social media analytics

Advertising campaign optimization

Sensor data analysis

Infrastructure monitoring

BigQuery

Prediction API

Easy to predict

Prediction API - Problématique

DATA ?

Prediction API - Training

DATA

ResultPhase 1 : Training

Prediction API - Prediction

DATA ?

Phase 2 : Predict

Compute Engine

Easy to Ops

Google Compute APIs

● REST API (OAuth 2.0 / json)● Python/Java/... Client APIs● gcutil command line● Web Console

NetworkInstance

Zones 3 US 2 Europe

Compute Engine concepts

Zones 3 US 2 Europe

NetworkNetworkInstance Disks

ephemeral, persitent

ImagecentOS, Ubuntu,

custom

MachinehighCPU, highMem,

...

Disksephemeral, persitent

FirewallsFirewalls

Instance Disksephemeral, persitent

ImagecentOS, Ubuntu, custom

MachinehighCPU, highMem, ...

Disksephemeral, persitentmetadatas

Compute Engine Command line gcutil

gcutil getproject --project=<project-id> --cache_flag_values

gcutil addfirewall http2 --description="Incoming http allowed." --allowed="tcp:http"

gcutil addinstance \

--machine_type=$MACHINE_TYPE \

--image=$MACHINE_IMAGE \

--zone=$ZONE \

--metadata_from_file=startup-script:$STARTUP_SCRIPT \

$INSTANCE_NAME

Mail API

Easy to mail

Cloud EndPoints

Easy to connect

Cloud EndPoints

Console d'administration

Google Accounts

Easy to AuthenticateEasy to Authorize

De la fiction à la réalité

http://googleappengine.blogspot.fr/2013/02/scaling-songpop-to-60-million-users.html

1,000,000 daily active users

Merci