Engineering and Developers Blog
What's happening with engineering and developers at YouTube
Modifying Chow-Down Part 2: Make it Faster!
Tuesday, April 21, 2009
As promised in the
previous blog post
, I was given the task of making our
Chow Down Gdata
sample a little faster. It would sometimes take a while to load restaurant information due to the requests to YouTube and Picasa Web Albums taking a while to be processed on the backend. Since this would cause the user to sometimes see a "loading" bar for several seconds; something had to be done.
Originally, the application used the Python client library to retrieve information from YouTube and PWA and then stored it inside of memcache. The new solution is to instead retrieves these feeds directly in the browser using the
json-in-script support
of the Google Data APIs. This approach worked well for the Chow Down application since we were not retrieving any private information for use in this application and so did not need to authenticate as a user.
Another benefit of using the JSON feeds is that the browser can asynchronously request results from both YouTube and PWA at the same time and render the results as soon as they are returned. This helps decrease the "perceived load time" that the user experiences since they are seeing information start to be loaded instead of just watching a progress bar.
The code for the entire sample is available on code.google.com:
http://code.google.com/p/gdata-samples/source/browse/trunk/chow-down-gdata/
But you can see all of the logic for retrieving the feeds using JavaScript in the ajax_restaurant_info template:
http://code.google.com/p/gdata-samples/source/browse/trunk/chow-down-gdata/src/templates/ajax_restaurant_info.html
The code makes use of the
jQuery JavaScript library
in order to remain compact and compatible.
So if your site is using the Data APIs of one or more Google properties and you don't need authentication, considering switching to the JSON feeds to improve perceived latency and let your pages load the AJAXy way.
Using the YouTube Data API with App Engine and the Python Client Library
Tuesday, August 26, 2008
Posted by Jochen Hartmann, YouTube APIs and Tools Team
For those of you that didn't get a chance to attend the hands-on CodeLab that Steph and I presented at
Google I/O
earlier this year, I just created a
new tutorial
that shows you how to use the
YouTube Data API
with
App Engine
and the
Python Client Library
.
The tutorial covers the following topics:
Writing a simple App Engine application
Test driving the Python Client Library
Using the Python Client Library with App Engine
Performing a video search
Authentication
Uploading videos
If you have any feedback or questions, drop by the
discussion forum
and let us know.
Labels
.net
360
acceleration
access control
accessibility
actionscript
activities
activity
android
announcements
apis
app engine
appengine
apps script
as2
as3
atom
authentication
authorization
authsub
best practices
blackops
blur faces
bootcamp
captions
categories
channels
charts
chrome
chromeless
client library
clientlibraries
clientlogin
code
color
comments
compositing
create
curation
custom player
decommission
default
deprecation
devs
direct
discovery
docs
Documentation RSS
dotnet
education
embed
embedding
events
extension
feeds
flash
format
friendactivity
friends
fun
gears
google developers live
google group
googlegamedev
googleio
html5
https
iframe
insight
io12
io2011
ios
iphone
irc
issue tracker
java
javascript
json
json-c
jsonc
knight
legacy
Live Streaming API
LiveBroadcasts API
logo
machine learning
mashups
media:keywords keywords tags metadata
metadata
mobile
mozilla
NAB 2016
news
oauth
oauth2
office hours
open source
partial
partial response
partial update
partners
patch
php
player
playlists
policy
previews
pubsubhubbub
push
python
quota
rails
releases
rendering
reports
responses
resumable
ruby
samples
sandbox
shortform
ssl https certificate staging stage
stack overflow
stage video
staging
standard feeds
storify
storyful
subscription
sup
Super Chat API
survey
tdd
theme
tos
tutorials
updates
uploads
v2
v3
video
video files
video transcoding
virtual reality
voting
VR
watch history
watchlater
webvtt
youtube
youtube api
YouTube Data API
youtube developers live
youtube direct
YouTube IFrame Player API
YouTube live
YouTube Reporting API
ytd
Archive
2018
Aug
Apr
2017
Nov
Sep
Aug
Mar
Jan
2016
Nov
Oct
Aug
May
Apr
2015
Dec
Nov
Oct
May
Apr
Mar
Jan
2014
Oct
Sep
Aug
May
Mar
2013
Dec
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
2012
Dec
Nov
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
2007
Dec
Nov
Aug
Jun
May
Feed
YouTube
on
Follow @youtubedev