This is a session given by Guillaume Laforge at Nordic APIs 2016 Platform Summit on October 26th, in Stockholm Sweden.
Description:
Web APIs are and more often specified with API definition languages like Swagger (now named Open API Spec), as it can help you generate nice interactive documentation, server skeletons, and client SDKs, mocks, and more, making it simpler to get started both producing and consuming an API.
In this session, Guillaume will demonstrate how to define a Web API with Swagger / Open API Spec, and scale it using Cloud Endpoints, on the Google Cloud Platform.
1. Proprietary + Confidential
Scale a Swagger-based Web API
with Google Cloud Endpoints
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
Slides available here:
bit.ly/endpoints-nordic
Cloud Endpoints
https://cloud.google.com/endpoints/
2. Proprietary + Confidential
Scale a Swagger-based Web API
with Google Cloud Endpoints
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
What does
Swagger bring
to the table?
3. Proprietary + Confidential
Scale a Swagger-based Web API
with Google Cloud Endpoints
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
How do we Scale
in the Cloud?
Google-style!
4. Proprietary + Confidential
Scale a Swagger-based Web API
with Google Cloud Endpoints
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
So what’s
Cloud Endpoints
13. Great for Tooling
Client SDKs
Server skeletons
Test stubs
Static & live mocks
Static documentation
14. Great for Tooling
Client SDKs
Server skeletons
Test stubs
Static & live mocks Sandbox & live playground
Static documentation
API Portal w/ provisioning
15. Great for Tooling
Client SDKs
Server skeletons
Test stubs
Static & live mocks Sandbox & live playground
Static documentation
API Portal w/ provisioning
Be careful with code generation
overwriting customisations
16. Proprietary + Confidential
Scale a Swagger-based Web API
with Google Cloud Endpoints
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
How do we Scale
in the Cloud?
Google-style!
19. Proprietary + Confidential
Google Container Engine — GKE
Powered by Kubernetes & Docker
OSS Kubernetes
based container
clustering
@glaforge
20. Proprietary + Confidential
Google Compute Engine — GCE
Customize your VM images
Full control:
Reusable and
customisable VMs
@glaforge
21. Proprietary + Confidential
Scale a Swagger-based Web API
with Google Cloud Endpoints
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
So what’s
Cloud Endpoints
24. Proprietary + Confidential
● API Management from Google
● This architecture serves hundreds
of billions of requests per day
● All configuration happens through
Open API Spec (JSON/HTTP & gRPC)
Cloud Endpoints
@glaforge
26. Proprietary + Confidential
Three key aspects
For public / private / mobile / µ-services use cases
Control access,
authenticate users
SECURE
@glaforge
27. Proprietary + Confidential
Three key aspects
For public / private / mobile / µ-services use cases
Logging and monitoring
of key metrics
SECURE MONITOR
@glaforge
28. Proprietary + Confidential
Three key aspects
For public / private / mobile / µ-services use cases
Speed and scalability
SECURE MONITOR SCALE
@glaforge
30. Proprietary + Confidential
Extensible Service Proxy
Why a server-local proxy?
Extremely thin
Eliminates network hop
Simpler, better security
Scales with your app
<1 ms latency
@glaforge
31. Proprietary + Confidential
Extensible Service Proxy
Why a server-local proxy?
Extremely thin
Eliminates network hop
Simpler, better security
Scales with your app
<1 ms latency
Will be
Open
Sourced
@glaforge
34. Proprietary + Confidential
JSON-HTTP/1.1
Use Open API specs
to manage RESTful
APIs written in any
language and with
any framework.
Proto-HTTP/2
Use gRPC to build
highly efficient
HTTP/2-based APIs
Choose your protocol
@glaforge
35. Proprietary + Confidential
Write once; serve twice
● At Google, our gRPC APIs serve both gRPC and
REST/JSON surfaces
● Proxy allows you to write a gRPC backend and
serve both REST/JSON and gRPC
● The only API management product that allows
managing gRPC-based APIs
@glaforge
45. Current state & supported platforms
● BETA: Cloud Endpoints for JSON / HTTP REST APIs
○ App Engine Flex, Container Engine, Compute Engine
○ Other clouds + on premise via Kubernetes
● ALPHA: Cloud Endpoints for gRPC
○ Same (except GAE Flex w/ HTTP/1.1 support only)
@glaforge
46. Proprietary + Confidential
Thanks for
your attention!
Guillaume Laforge
Staff Developer Advocate
Google Cloud Platform
@glaforge
Slides available here:
bit.ly/endpoints-nordic
Cloud Endpoints
https://cloud.google.com/endpoints/
47. References
Slides of this presentation
http://bit.ly/nordic-endpoints
Google Cloud Endpoints
https://cloud.google.com/endpoints/
Managing gRPC APIs with Google Cloud Endpoints
http://www.slideshare.net/WenchengLu/managing-grpc-apis-with-google-cloud-endpoints
Choosing a compute option on Google Cloud Platform
https://cloud.google.com/docs/choosing-a-compute-option
@glaforge
48. Picture credits — public domain images
Truth newspaper
https://pixabay.com/fr/v%C3%A9rit%C3%A9-journal-actualit%C3%A9s-imprim%C3%A9-166853/
Women working together
https://pixabay.com/fr/femmes-travail-d-%C3%A9quipe-l-%C3%A9quipe-1209678/
Drill
https://pixabay.com/fr/t%C3%AAte-de-forage-foret-perceuse-m%C3%A9tal-444504/
Pancakes
https://pixabay.com/fr/cr%C3%AApe-cr%C3%AApes-manger-alimentaire-640865/
Room service icon
https://pixabay.com/fr/service-de-chambre-serviteur-service-297071/
@glaforge