Blog of our latest news, updates, and stories for developers
Using Google App Engine to power Web APIs
Monday, April 20, 2009
This post is part of the
Who's @ Google I/O
, a series of blog posts that give a closer look at developers who'll be speaking or demoing at
Google I/O
. Today's post is a guest post written by Steven Willmott of
3scale
.
Public APIs are a great way to share data and functionality, both for existing applications and as useful resources in their own right. Google Maps, Calendar and many other APIs lead the way in this and are now powering tens of thousands of sites and applications. Flickr, Twitter and others also provide great data and functionality which can be used to enhance and build new applications.
While APIs can provide great value add, it's not always obvious how to make one available if you're not Google or Yahoo. Although serving content via an API is effectively no different than via a user-facing web app - just serving HTTP traffic with XML, JSON or arbitrary data rather than HTML, CSS and Javascript normally destined for a browser - it does come with some unique challenges: authentication works differently, inbound traffic is often automated and response times need to be rapid for the API to be usable within another site - all a bit different from a standard web app.
Since we're in the API business we often get asked about how to quickly get a new API up and running, and one neat new way to do this is using Google App Engine, which provides a lot of the core ingredients needed to launch a new API and help it scale. To see how this works we put together a quick and dirty trial service which exposes App Engine's Image manipulation functions as a new Web API:
First we set up a standard App Engine account giving us the standard dashboard and deployment environment. This provides the runtime environment plus a range of tools to monitor the application - all useful to track resource usage which we'll need to worry about later.
The service itself in this case is a simple wrap of wrapping App Engine's available image manipulation features which provide standard image manipulation features, but it could easily be more complex.
Next up, the functionality is wrapped in a simple RESTful interface. There are multiple ways to do this, libraries such as the
App Engine Rest Server
and the
Django rest interface
or a port of the Ning-like
REST interface
can be used to do most of the heavy lifting. Gae-Rest for example includes indexes and memcache and other features to optimise response times on the API. These give the API standard GET, POST, PUT, DELETE operations we'll need to push images in and out of the application.
Finally, while we have the service ready to roll we still need a way for developers to access the service, manage their resource usage and track activity on the API. To do this we can use
3scale's API management platform
which provides these features out of the box. Connection works using a standard python plugin and the system creates a configurable management portal for the service which handles signup keys, usage limits, traffic analysis and the documentation needed to support developers using the new API. For heavy users we can also add paid plans to cover any App Engine costs or make a small profit - check out the appspotimage portal here:
The service can now take advantage of App Engine's scalability - even under the constraints of the plan, your API should comfortably serve up 500,000 - 1 Million hits per day (although note that you need to check other resource limits - not just hits) which would be non-trivial to arrange and potentially high cost on a lot of existing hosting services. If you're serving traffic from appspot.com (for appspotimage we serve the management interface from appspotimage.com and the API traffic from appspot.com) response times from App Engine tend to be very fast (sub 10ms if you're on the west coast US) - which is great for API users.
Although backend APIs are not quite as visible as a new Android or iPhone App, they often provide a great resource and hopefully we'll see more and more datasets and new types of processing on line as APIs.
You can find the service itself
here
along with a
longer tutorial on how we built it
. Stay posted for some other services coming soon, as we start to play around with Java language support on App Engine.
We'll be at
Google I/O
on May 27-28 and look forward to talking APIs and App Engine, so stop by the
Developer Sandbox
. See you there!
Guest Post by Steven Willmott of
3scale
1 comment :
Santiago Basulto
January 13, 2012 at 8:14 AM
Good post. Thank you.
Reply
Delete
Replies
Reply
Add comment
Load more...
Labels
.app
.dev
#30DaysOfFlutter
#AIY
#Contacts API
#CSEdWeek
#devfest18 #devfeststories #gdg #googledevelopers #developers #community
#freeandopen
#GDC20
#Google Workspace
#Google Workspace Add-ons
#Google Workspace Developer
#GooglePlay #AndroidDevStory #PlayStore #DeveloperConsole #StoreListingExperiments
#growwithgoogle
#io12
#io13
#io14
#io15
#io16
#io17
#io18
#io2012
#io2013
#io2014
#PeopleAPI
+1
20% project
3d
3D face mesh
about.com
accelerator
Access
accessibility
Account Linking
actions
Actions Builder
Actions console
actions on google
Actions SDK
actionsongoogle
activity
Administrative APIs
AdMob
adobe
Adobe Creative Cloud
Adobe Creative Cloud Libraries
Ads
adsense
advanced
advogato
AdWords
africa
agency program
agpl
AI
AI Principles
AIY
AIY Projects
AIYProjects
ajax
ajax apis
ajax search
ajax search books news apis
Alfred Camera
all for good
amarok
AMP
AMP Cache
analytics
and Assistant
android
Android App Development
Android Developer
android developer certification
android developers
Android Development
Android Studio
Android Things
Android Tools
Android TV
android wear
android11
androidstudio
animation
Announcement
announcements
apache
api
API.AI
apis
apis console
apis explorer
apis. charts
app
app design
App dev
App Development
app engine
app indexing
app indexing api
App Invites
apple
Application Development
apps
apps script
AR
ARCore
area 120
artifact management
Artificial Intelligence
asia
asl
assistant
atom publishing protocol
Audio
augmented faces
Augmented images
augmented reality
australia
Auth
authentication
authsub
automatic speech recognition
AutoML
awards
axsjax
barcodes
Bazel
beacon
beacons
Belarus
bespin
best practices
beta
bigquery
bitcoin
Black Consciousness Day
Blockly
blogger
Bluetooth
book search
books API
bootcamp
braintree
Brazil
british english
Brotli
browser
Build Out
building ajax apps
BuildOut
Bulgaria
business
business console
buzz
c++
Cache
caja
caldav
calendar
camino
campfire one
caption
cardboard
CardDAV
cast
Cast Connect
celebrating
Certification
certification award
channel
chinese
chrome
chrome apps
chrome dev summit
chrome devtools
chrome experiment
chrome extensions
chrome os
Chrome OS IO
Chrome OS IO19
chrome web store
Chromebooks
chromecast
chromium
chronoscope
cifs
classes
classroom api
client libraries
closure tools
cloud
Cloud anchor
Cloud Anchors
Cloud Computing
cloud datastore
Cloud Functions
cloud functions for firebase
Cloud Next
cloud platform
cloud portability
cloud services
cloud sql
cloud storage
Cloud Study Jam
cms
coca cola
CocoaPods
code for educators
code jam
code review
code-in
codeedu
codelabs
coding
coffee with a googler
Colaboratory
collada
color
Colt McAnlis
commerce
community
community connectors
compatibility
competition
Compilers
compression
compressorhead
computer science
Computer Science Education Week
computer vision
computing heritage
conference
conferences
Console
contacts api
Containers
contest
contextual gadgets
conversation design
conversations
Coral
Coral updates
Core ML
couchdb
countdown to I/O 2012
country support
courses
COVID
COVID-19
COVID19DetectProtect
CPU
crash course
Crash Reporting
crashlytics
creative commons
cricket
crisis response
Croatia
Crostini
cryptocurrency
cryptography
css
css3
Custom Elements
custom search
custom search api
Czechia
DA
danish linux forum
dart
Data Compression
Data science
Data Visualization
database
Databases
Dataset
Datasets
datastore
dataviz
Daydream
Debian
deprecation
Depth
design
desktop
desktop apps
Dev Tools
devart
develop
developer
Developer Advocate
Developer Communities
Developer Culture
developer expert
developer features
Developer Keynote
Developer Preview
developer relations
developer student clubs
developers
developers. meetup
Development
devfest
devfest developer chrome maps social wave apps
DevFest18
DevFestStories
Device
DFP
Dia da Consciência Negra
dialogflow
differential privacy
discovery service
diversity
diversity-and-inclusion
django
dns
do-it-yourself
Docker
docs
documentation
documents list api
dojo
domain
domains
doodles
dot net
doubleclick
dreamweaver
Drive
drupal
dsc
dynamic links
earn
earth
Ebay
eclipse
eclipsecon
eddystone
Edge AI
Edge TPU
Edge TPU Accelerator
Edge TPU Dev Board
educatio
education
email
EMEA
endpoints
enterprise
Entity Extraction
entrepreneurs
Error logging
Estimator
Estimators
estonia
Ethics
Europe
event
events
evolution
execution api
extensions
Fabric
face detection
Fairness
fairness in machine learning
faster web
FCM
FCP
featured
feeds
finance
fintech
Firebase
Firebase Analytics
Firebase Cloud Messaging
Firebase Dynamic Links
firebug
firefox
firestore
firevox
firstbeta
fitness
flutter
Flutter 1.2
Flutter 1.5
Flutter 1.9
Flutter 2
Flutter at IO
Flutter Clock
Flutter Create
Flutter Engage
Flutter for desktop
Flutter for web
Flutter Interact
Flutter Live
flutter release preview 1
flutter release preview 2
Follow Us
font api
Fonts
fosdem
founders
freebsd
freenet
Fridaygram
fusion tables
G Suite
G Suite Developer
G+
gadgets
Game Developers Conference
games
gaming
gcc
gci
GCP
GDA
gdata
GDC 2020
GDC17
GDD
gdd07
gdd08
gdd09
GDD11
GDE
gdg
gdl
gdl weekly
gears
General Availability
geo
geolocation
geoserver
GET
getpaid
ghop
Gigster
git
github
GKE
Glass
gmail
Gmail Add-on
Gmail API
Gmail APIs
GMTC
gnome
gnome women's summer outreach program
Go
golang
goo.gl
Google
Google AI
Google Analytics
Google APIs
google apps
google apps api
google apps for your domain
google apps marketplace
Google AR
google assistant
Google Assistant Bluetooth
Google Assistant Developer Day
Google Assistant IO
Google Assistant IO19
google assistant sdk
Google Brain
google buzz
Google Cardboard
google cast
google certification
google chart api
Google Charts
google checkout
google chrome
Google Cloud
Google Cloud Messaging
Google Cloud Platform
google cloud storage
Google Cloud Talks
Google Cloud training
google code
google code project hosting
google code search
google code university
google compute engine
Google Coral
google data apis
google data protocol
Google Data Studio
google developer day
google developer days
Google Developer Experts
Google Developer Groups
Google Developer Scholarship
google developers
Google Developers Academy
google developers certification
google developers community groups
Google Developers Groups
Google Developers Live
Google Developers site
Google Developers University Consortium
google docs
Google Docs Add-on
Google Docs API
google doctype
google domains
Google Drive
Google Drive SDK
google earth
google fit
Google Fonts
Google For Games
google for startups
google friend connect
google gadgets
google gears
google grants
Google Groups Settings
google health
Google Home Hub
Google I/O
Google Identity Platform
Google in Asia
google io
Google IOS Android
Google Maps
Google Maps Platform
google mashup editor
Google Noto fonts
google pay
google pay account
google pay api
google pay business
Google Pay Developers
Google Pay India
google pay integration
google pay support
google photos
google platform
Google Play
Google Play Developer API
Google Play Developers
google play services
Google Registry
google scholarships
Google Science Fair
Google sheets
Google Sheets Add-on
Google Sheets API
Google Slides
Google Slides Add-on
Google Slides API
google space
Google Spreadsheets API
google storage
google summer of code
Google tech talk
Google technology
google technoloy user groups
google tv
google visualization api
google wallet
Google Wave
google web elements
google web toolkit
Google Workspace
Google Workspace Add-ons
Google Workspace Developer
google.org
google+
GoogleAssistant
googlecast
googledevelopers
googleio
googlenew
GooglePlay
GooglePlay AndroidDev
googlewebelements googleio
GPE
GPGS C++ Games
GPT
Gradle
green linux
Groovy
Groups API
grow
grow with google
gsoc
GSuite
gtags
gtug
guest post
guice
gulp
GWSOP
gwt
gzip
hackathon
hacking
hackthon
hamilton
Handwriting
hangouts
Hangouts Chat
Hangouts Chat API
haproxy
Headset
hg
hibernate
howto
hpux
html
html5
http
I/O
I/O 17
I/O 2017
I/O Extended
I/O Live
ical
ICYMI
identity
ietf
ignite
igoogle
iguanas
iiw
Image Compression
image search
Imara
In-app billing
in-app payments
in-app purchase
incubator
India
indie
Indie Games Accelerator
information visualization
Instagram
integration status
intelligentwire
interactive music
International Women’s Day
internationalization
internet explorer
internet of things
internship
interviews
IO
IO17
io18
IO19
IO19 Flutter
IO2017
ios
iOS SDK
IoT
ipad
iphone
iPhone Development
israel
Issue Tracker
IWD 2020
IWD 2021
jaiku
japanese
java
javascript
jetpack
joomla
joomladayus2007
joomladayusa
JS
json
karaoke
KDE
KDE 4.0
Keras
kernel
kernel summit
keynote
khronos
kids
kids coding
kids coding team
kml
korean
Kotlin
Krakow
Kubernetes
labs
lanchpad
language
languages
laptop apps
laptops
latam accelerator
LatAm startups
Latest
Latin America
latitude
latvia
launch
launchpad
launchpad accelerator
launchpad studio
LaunchShow
lca
Leadership
Learning
lens
lessons
licenses
linux
linux foundation
Linux on Chrome OS
Linux on Chromebooks
linux summit
linux virtual server
linuxconf eu
lithuania
Local Home
Local Home SDK
localization
Location
LoCo
Logging
london
mac
MacFuse
Machine
machine intelligence
machine learning
machine learning accelerator
Mainframe Migration
maker
Makers
malware
maps
maps apis
Marketplace
material
material components
material design
MDL
MediaPipe
meetup
mercurial
Mexico startups
Micronaut
Microservices
MIT CSAIL
MIT Media Lab
ml
ML Kit
MLCC
mobile
Mobile App Development
mobile design
Mobile Development
mobile performance
mobile sites
mobile speed
mobile UX
Mobile web
Mobile World Congress
mod_pagespeed
Moderator
monetize
Monthly roundup
MOOC
mozilla
multi-platform
mylar
myspace
MySQL
mythtv
named
narratives
native ads
native client
nearby
Nest
Nest WiFi
netbsd
Next Billion Users
non-profit
nonsense
nosql
notifications
Noto Serif CJK
NPM
nss
nvidia
NYT
O3D
oauth
OAuth playground
OAuth2
Object Detection and Tracking
objective-c
OCaml
Occlusion
ocr
ODF
office hours
oha
online payments
OOXML
open data
open source
open source blog
open source releases
open web
open-source
openajax alliance
opengl
openid
opensocial
openssh
openssl
Optimization
oreilly
orkut
oscon
oscon2007
osi
oss devs
ossjam
osx
pactester
page speed
PageSpeed
palette
payment handler
payment request api
payment web standard
payments
paypal
Peer bonus program
performance
persistence
persistent AR
phone
photos
picasa
picasa web
places API
play services
playground
plone
plone sprint
podcast
poland
Poly
polymer
Polymer Summit
portugal
Pose Detection
Pose Estimation
posix
POST
PowerMeter API
prediction api
Prerender
preview
privacy
prizes
processing
production access
products - slides
programmers
programming
Progressive Web App
Project Connected Home over IP
project hosting
Project Loon
Project Tango
prototype
proximity
pubsubhubbub
PWA
py3k
python
python sprint
Qualcomm
Qualcomm Google
rails
random hacks of kindness
Rasberry Pi
React
reader
releases
Remote Config
research
reserve seats
Resources
Responsible AI
REST
result snippets
Reto Meier
review process
Rewarded Ads
Rewarded Video Ads
rhino
Saatchi
Safety & Security
safety and security
salesforce
samba
Sample dialogs
sandbox
Santa Tracker
Scala
scalability
scale-ups
Sceneform
schedule
scholarship
scholarships
scopes
Scratch
screencast
sdk
sdks
search
security
Selfie Segmentation
Serbia
serif
Serverless
service worker
sessions
seurat
shape
Sheets
Sheets API
shindig
shopping
Shoreline Amphitheatre
shortcuts
showcase
sidewiki
Sign language
sign-in
signall
silverstripe
SIMD
sitemaps
sites api
sixapart
sketchup
Slides API
small business
small businesses
small-business
Smart Home
Smart Lock for Passwords
soap search api
soc
social
social graph
solaris
solutions challenge
souders
spa2007
Space
spdy
speakers
speech
speed
speed tracer
Spring
spyware
Stable release
Stackdriver
standards
startup
Startup accelerator
startup africa roadtrip
startups
Static Sites
STEM
storage
stories
Street View
Strobe
student programs
students
stuff
style
subscribed links
subscription
subversion
summer of code
Sundar Pichai
SVG
sxsw
syndication
targeted spyware
tasks API
Team Drives (new)
techmakers
Technical Writing
technology
templates
TensorFlow
tensorflow dev summit
TensorFlow Lite
TensorFlow Research Cloud
tensorRT
Test Lab
testing
text embedding models
Tez
TF Lite
tfdevsummit
TFLite
themes
thought leadership
tool
Toolkit
tools
topp
TPU
TPU Dev Board
training
Traits
tranparency
transit
translate
translation
tutorials
tv
ubiquitous computing
ubiquity
ubucon
ubuntu
Udacity
UI
Ukraine
UN
UNDP
UNICEF
unicode
unit test
Unity
universal
Universal App Campaigns
University
unix
Update
updates
url
url shortener
URLs
UX
verification
video
videos
Vim
virtual keyboard
virtual reality
visualization
voice
voice kit
voice technology
voice user interface
VR
VUI
wattpad
Wearables
Weave
web
web animations api
web apps
web components
web design
web designer
web development
web exponents
web fonts
web performance
web platform docs
web registry
webfonts
webgl
webmaster
WebP
website optimizer
websites
webVR
weekly roundup
WhiteHouse.gov
Who's at Google I/O
win
windows
windows programming
Winter of Code
women developers
Women in Tech
Women Tech Makers
women techmakers
WomenTechmakers
writing
wtm
xauth
yahoo
young developers
Young Makers
youtube
zlib
zurich
ZXing
Archive
2021
Apr
Mar
Feb
Jan
2020
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2019
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2018
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2017
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2016
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2015
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
2014
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2013
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2012
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2007
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2006
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2005
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Subscribe
Follow @googledevs
Visit
Google Developers
for docs, event info, and more.
Good post. Thank you.
ReplyDelete