SlideShare une entreprise Scribd logo
1  sur  68
Mobile Data:
  How to avoid the latency
trap when using web services
Tom Hughes-Croucher
       @sh1mmer
What is the latency
      trap?
Mobile
Web Service   My Server
My Server   Web Service
Optical Fibre
Web Service   AT&T
Web Service   AT&T
Radio Waves
Web Service   AT&T
Web Service   AT&T
Web Services


               AT&T
Bigger than mobile?
Wifi sucks.
Ofcom study
• UK study into Wifi interfence (PDF)
• Upto 90% of bandwidth used on protocol
• Many other sources of interference
 • Baby monitors
 • Microwaves
 • Cordless Phones
Interference sucks.
So how do we fix it?
1. Reduce Requests
Web Services


               AT&T
Web Services


               Server   AT&T
Reducing requests

• Yahoo! Performance Guidelines
 • http://developer.yahoo.com/performance
• Reduce web service requests
 • Bundle requests from device logically
 • Gzip all web service responses
2. Shape to packets
Indiana Packet and the
    Byte of Doom
Packet #1 Payload

    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    .....................................................................
    ...........................................................

    Packet #2 Payload
    .
1 extra byte means
  1 extra packet
Reduce number of
    packets
Packet sizes
• Make sure static assets (JS, images, etc) fit in
  discrete packet boundaries
  • Don’t forget Gzip
• Try and figure out ‘high latency’
  connections to send inlined assets to
  • E.g. detect ‘iPhone’
Packet Research
http://developer.yahoo.net/blog/archives/2009/10/
              a_engineers_gui.html
•   What is YQL?

•   Why is YQL bad-ass for mobile development?

•   How you can use YQL in mobile development

•   Examples
What is YQL?
dev
dev
dev
dev
dev
dev
dev
dev
dev
dev
dev
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2




      http://weather.yahooapis.com/
      forecastrss?p=FRXX0076&u=c
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2




      http://weather.yahooapis.com/
      forecastrss?p=FRXX0076&u=c
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2




      http://weather.yahooapis.com/
      forecastrss?p=FRXX0076&u=c
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2




      http://weather.yahooapis.com/
      forecastrss?p=FRXX0076&u=c
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2




      http://weather.yahooapis.com/
      forecastrss?p=FRXX0076&u=c
var map = new
          YMap(document.getElementById('map'));
          …
dev       var currentGeoPoint = new
          YGeoPoint( _c.Lat, _c.Lon );
          map.addMarker(currentGeoPoint);


      ?
          …



          …
          if (flickcurl_prepare(fc,


      ?
          "flickr.photos.geo.correctLocation",
          parameters, count)) { … }
          …



      ?   http://search.yahooapis.com/
          ImageSearchService/V1/imageSearch?
          appid=YahooDemo&query=Corvette&results=2


      ?
          http://weather.yahooapis.com/
          forecastrss?p=FRXX0076&u=c
var map = new
          YMap(document.getElementById('map'));
          …
dev       var currentGeoPoint = new
          YGeoPoint( _c.Lat, _c.Lon );
          map.addMarker(currentGeoPoint);


      ?
          …



          …
          if (flickcurl_prepare(fc,


      ?
          "flickr.photos.geo.correctLocation",
          parameters, count)) { … }
          …



      ?   http://search.yahooapis.com/
          ImageSearchService/V1/imageSearch?
          appid=YahooDemo&query=Corvette&results=2


      ?
          http://weather.yahooapis.com/
          forecastrss?p=FRXX0076&u=c
Yahoo!    My Yahoo!   Mail                                                                                                             Welcome, guest       Sign In

                                                                                                                                                         Search
                                                  var map = new
MY PROJECTS            APIs & WEB SERVICES          RESOURCES            SUPPORT

YDN       Maps Suite     AJAX Maps
                                                  YMap(document.getElementById('map'));
Yahoo! Maps Web Services - AJAX API Getting       …                                                               READY TO GET STARTED?
                                                                                                                                                                  You aren't signed in      Sign In   Help


         dev Home The Tour Sign Up Explore currentGeoPoint = new
Started Guide                                     var                        Get an App ID
                                                                                           Search
                                                  YGeoPoint( _c.Lat, _c.Lon );
Learn the fundamentals of the Yahoo! Maps AJAX API and start creating your own maps. This page contains:

Introduction and Prerequisites
               Flickr Services                    map.addMarker(currentGeoPoint);
                                                                          Yahoo! Maps Cheatsheets
                                                                                   Yahoo!    My Yahoo!  Mail  RECENT BLOG ARTICLES




                                                            ?
Examples                                                                                                                                                                                                                             Welcome, guest            Sign In
      Display a Yahoo! Map
               API Documentation Feeds Your API Keys Apply for a new API Key
      Add controls to your Yahoo! Map
      Add a logger to a Yahoo! Map
                                                  …                                                           Leonardo da Vinci: Hacker
                                                                                                              January 24, 2009
                                                                                                                                                                                                                                                       Search


      Place a marker on a Yahoo! Map
      Draw Polylines on a Yahoo! Map
                                                                                  MY PROJECTS          APIs & WEB SERVICES             RESOURCES            SUPPORT
                                                                                                              Whaddyathink? & the Yahoo! Application
                                      flickr.places.getPlaceTypes
      Place Smart Markers on a Yahoo! Map
      Add multiple custom markers on Yahoo! Map
                                                                                 YDN       Weather RSS Feed
                                                                                                              Platform
                                                                                                              January 22, 2009
      Traffic information overlay
      Yahoo! Pipes RSS output information overlay          Yahoo! Weather RSS Feed                            Making the new Yahoo! Currency Converter
                                                                                                                                   Yahoo!    My Yahoo!   Mail                                                                                                                                  Welcome, guest             Sign In
                                        Fetches a list of available place types for Flickr.
      Yahoo! Pipes JSON output information overlay                                                            accessible
      Local search results overlay
      Overlay GeoRSS XML data
                                                                          YMap
                                                                                     …
                                                                                 The Weather RSS feed enables you to get up-to-date weather information for your location. You can save this
                                                                                                              January 21, 2009
                                                                                                                                                                                                                                                                                                                    Search
                                                                                 feed in My Yahoo! or your favorite feed aggregator, or incorporate the RSS data into your own web site or client
      Overlay custom objects at YGeoPoint location
                                      Authentication
      Overlay custom objects at YCoordPoint location                                 if (flickcurl_prepare(fc,
                                                                                 application. The Weather RSSRetrievingdynamically-generatedfrom based on zip code or Location ID.
                                                                                                               feed is a and displaying data feed
                                                                                                              Wikipedia with YQL PROJECTS
                                                                                                                                  MY                    APIs & WEB SERVICES             RESOURCES        SUPPORT




                                                            ?
      Overlay polyline on Yahoo! Map
                                                                                 This page describes the format of the 18, 2009 URL and the RSS response for developers. It contains these
                                                                                                              January request
      Export Yahoo! Map in GeoRSS format
      GeoRSS overlay with polyline     This method does not require authentication.  "flickr.photos.geo.correctLocation",
                                                                                 sections:
                                                                                                                                  YDN       Image Search Documentation for Yahoo! Search Web Services

      Get zoom level given radius from center
      Custom position of controls     Arguments                                      parameters, count)) { …Documentation for Yahoo! Search
                                                                                      RSS Request
                                                                                           Summary
                                                                                                   Image Search }                                                                                                                                                   READY TO GET STARTED?
                                                                                                                                                                                                                                                                    By applying for an Application ID for this service, you
      Change Marker Images Dynamically                                                                                                                                                                                                                              hereby agree to the Terms of Use
      Use YMapTypeControl to position map types
                                       api_key (Required)
Other Features of the Yahoo! Maps AJAX API
                                                                                     …     Request Parameters
                                                                                      RSS Response
                                                                          YEvent, YGeoRSS, YMarker Submitting Image Queries
Rate Limit                                                                                                                                                                                                                                                                             Get an App ID
                                              Your API application key. See here for moreTop-Level Elements
                                                                                             details.                             The Image Search Web Service allows you to search the Internet for images.
Terms of Service                                                                           Channel Elements




                                                            ?
Support & Community
                                                                                           Image Elements
                                      Example Response                                     Item Elements
Download all of the cheatsheets and example code in the Yahoo                                                                        Request URL
Maps API Reference Bundle.                                                                 Condition Codes                                                                                                                                                          YAHOO! GROUPS DISCUSSIONS                           view all
                                        <place_types>                                 Examples                                    http://search.yahooapis.com/ImageSearchService/V1/imageSearch
For detailed descriptions of the classes and methods in the API, place_type_id="22">neighbourhood</place_type>
                                             <place_type                                                                                                                                                                                                            yahoo local search code in php
                                                                                 Terms of Use
check out v3.8 Reference Manual.                                                     http://search.yahooapis.com/
                                             <place_type place_type_id="7">locality</place_type>
                                          <place_type          place_type_id="9">county</place_type>                       Request parameters
                                                                                                                                                                                                                                                                    Tue, 27 Jan 2009


                                                                              RSS Request                                                                                                                                                                           My Web Search API shut down
                                          <place_type
                                          <place_type
                                                                                     ImageSearchService/V1/imageSearch?
                                                               place_type_id="8">region</place_type>
                                                                       Remaining, Supporting Classes
                                                               place_type_id="12">country</place_type>                     See information on constructing REST queries
                                                                              The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add
                                                                                                                                                                                                                                                                    announcement
                                                                                                                                                                                                                                                                    Wed, 21 Jan 2009
Introduction and              Prerequisites
                                          <place_type          place_type_id="29">continent</place_type> (?). Multiple parameters are separated by an ampersand (&).
                                      </place_types>                                 appid=YahooDemo&query=Corvette&results=2
                                                                              parameters and values after a question mark
The Yahoo! AJAX Maps API lets developers add maps to their web sites using DHTML and JavaScript®. the Weather RSS feed is
                                                                                                                                       Parameter
                                                                                                                                      appid
                                                                                                                                                     Value
                                                                                                                                                   string (required)
                                                                                                                                                                            Description
                                                                                                                                                                          The application ID. See Application IDs for more information.
                                                                                                                                                                                                                                                                    Re: Site Explorer API returns 999 Rate Limit
                                                                                       The base URL for Maps




                                                            ?
                                                                                                                                                                                                                                                                    Exceeded
are fully embeddable and scriptable using the JavaScript programming language. Yahoo! Maps AS-Flash API's                             query        string (required)      The query to search for. Use + to include terms, - to exclude terms, and                  Wed, 21 Jan 2009
                                      Error Codes
built-in geocoder means that you can specify a physical address or latitude/longitude coordinates for your map's
                                                                                       http://weather.yahooapis.com/forecastrss                                           put quotes around "exact phrase".
location, as you like.                                                                                                                type         all (default), any, or The kind of search to submit:                                                             Reminder: Old obsolete versions of Local
                                                                                       In this section, Summary shows how to make an RSS request with different parameters; Request Parameters
                                                                                                                                                   phrase                                                                                                           Search (V1, V2) shutting do
In order to create and test applications 100: Yahoo! Maps AJAX API, you'll need to use a supported summarizing those parameters.
                                         using Invalid API Key                         shows a table web                                                                  all returns results with all query terms.                                                 Mon, 19 Jan 2009
                                                The API key passed was not valid or has expired.
browser: Firefox 2, Internet Explorer 6 or 7, Opera 9 or Safari 3. Newer versions of these browsers are also                                                              any returns results with one or more of the query terms.
supported. You can code your JavaScript applications usingcurrently unavailable
                                         105: Service your favorite text editor or IDE.                                                                                   phrase returns results containing the query terms as a phrase.
                                                                                       SUMMARY                                        results      integer: default 10, The number of results to return.
                                                The requested service is temporarily unavailable.
An application ID is required to use the Yahoo! Maps AJAX API. You can get an application ID here.                                                 max 50
                                                                                       The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add
                                      111: Format "xxx" not found
                                                                                                                                       start         integer: default 1
                                                                                      parameters and values after a question mark (?). Multiple parameters are separated   by an starting result position to return (1-based). The finishing position (start
                                                                                                                                                                            The ampersand (&). For
For best results, you should launch your web pagesrequested response format was not found. applications
                                                The from a web server. However, it's possible to run                                                                        + results - 1) cannot exceed 1000.
                                                                                      the Weather RSS feed there are two parameters:
directly from your hard drive by double-clickingMethod This can be donefound
                                       112: on them. "xxx" not by lowering the security settings in                                    format        any (default), bmp,    Specifies the kind of image file to search for.
the Internet Explorer browser or by setting the The requested method was not found. p for location.
                                                UniversalBrowserRead property in Firefox.                                                            gif, jpeg, png
                                       114: Invalid SOAP envelope                    http://weather.yahooapis.com/
                                                                                          u for degrees units (Fahrenheit or Celsius). adult_ok      no value or 1   The service filters out adult content by default. Enter a 1 to allow adult
                                                                                                                                                                     content.
                                             The SOAP envelope send in the requestlocationnot be parsed. required. Use this parameter to indicate the location for the weather forecast as a
                                                                                 The could parameter p is
Displaying a Yahoo! Map
                                    115: Invalid XML-RPC Method Call
                                                                                     forecastrss?p=FRXX0076&u=c
                                                                                 zip code or Location ID.                      coloration     any (default), color, The service returns only the images of the coloration specified (color or
                                                                                                                                              bw                     black-and-white).
All the API classes and methods necessary to interact with Yahoo! Mapsdocument couldyour application when
                                             The XML-RPC request are availablehttp://weather.yahooapis.com/forecastrss?p=location
                                                                                  to not be parsed.
                                                                                                                               site           string: default no     A domain to restrict your searches to (e.g. www.yahoo.com). You may
you include Yahoo! Maps AJAX API library in your web page.This example uses the demonstration application
                                                                                                                                              value                  submit up to 30 values (site=www.yahoo.com&site=www.cnn.com).
ID "YD-eQRpTl0_JX2E95l_xAFs5UwZUlNQhhn7lj1H"; you cannot use this Application Forand must requestweather for Yahoo! Headquarters in Sunnyvale, CA, use the zip code for Sunnyvale
                                                                                 ID example, to get one
here.                                 API Explorer                               (94089):
                                                                                                                               output         string: xml            The format for the output. If json is requested, the results will be returned
                                                                                                                                              (default), json, php in JSON format. If php is requested, the results will be returned in
                                                                                                                                                                     Serialized PHP format.
  <html>                            API Explorer : flickr.places.getPlaceTypes   http://weather.yahooapis.com/forecastrss?p=94089
  <head>                                                                                                                       callback       string                 The name of the callback function to wrap around the JSON data. The
  <b><script type="text/javascript"                                              Or use the Location ID for Sunnyvale (USCA1116):                                    following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has
var map = new
      YMap(document.getElementById('map'));
      …
dev   var currentGeoPoint = new
      YGeoPoint( _c.Lat, _c.Lon );
      map.addMarker(currentGeoPoint);
      …



      …
      if (flickcurl_prepare(fc,
      "flickr.photos.geo.correctLocation",
      parameters, count)) { … }
      …



      http://search.yahooapis.com/
      ImageSearchService/V1/imageSearch?
      appid=YahooDemo&query=Corvette&results=2




      http://weather.yahooapis.com/
      forecastrss?p=FRXX0076&u=c
dev




      YQL
dev




      YQL
dev



       Bindings




      YQL
YQL

• Unified interface to Web services
• Self-describing to avoid documentation
• Uses a common way to return data
YQL is like SQL
• Uses SQL verbs
• Uses SQL syntax
• Returns rows of data
• Self-describing
 • show tables;
 • desc table;
Verbs
•   show - show tables;

•   desc - desc search.web;

•   select - select * from flickr.photos.recent;

•   use

•   insert

•   update

•   delete
Demo
http://developer.yahoo.com/yql/console
Web Services


               Server   AT&T
YQL Example
select * from flickr.photos.info
where photo_id in (select id from
flickr.photos.search where query =
              “lolcats”)
Conclusion
• Latency hurts anything wireless
• Fight latency by reducing connections
• Fight latency by reducing the number of
  unnecessary packets
• YQL can help you bundle your requests to
  mobile device without a backend
follow me on
twitter.com/sh1mmer
        Slides? Feedback?
  www.speakerrate.com/sh1mmer

Contenu connexe

Similaire à Mobile And The Latency Trap

Easy Web Data with YQL for Mobile Development
Easy Web Data with YQL  for Mobile DevelopmentEasy Web Data with YQL  for Mobile Development
Easy Web Data with YQL for Mobile DevelopmentTom Croucher
 
YQL - select * from internet version 2
YQL - select * from internet version 2YQL - select * from internet version 2
YQL - select * from internet version 2Tom Croucher
 
YQL - A Query Language for the Web
YQL - A Query Language for the WebYQL - A Query Language for the Web
YQL - A Query Language for the WebTom Croucher
 
Yql Openhackday 2009
Yql Openhackday 2009Yql Openhackday 2009
Yql Openhackday 2009nageshs
 
YQL and YUI - Javascript from server to user
YQL and YUI - Javascript from server to userYQL and YUI - Javascript from server to user
YQL and YUI - Javascript from server to userTom Croucher
 
How to avoid the latency trap and lessons about software design
How to avoid the latency trap and lessons  about software designHow to avoid the latency trap and lessons  about software design
How to avoid the latency trap and lessons about software designTom Croucher
 
Yql Intercon 09
Yql Intercon 09Yql Intercon 09
Yql Intercon 09bzanchet
 
GeoTechTalk InkSatogaeri Project
GeoTechTalk InkSatogaeri ProjectGeoTechTalk InkSatogaeri Project
GeoTechTalk InkSatogaeri ProjectKentaro Ishimaru
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineAndy McKay
 
Google MAP API
Google MAP APIGoogle MAP API
Google MAP APIEric Lee
 
Y Map Mashup Camp
Y Map Mashup CampY Map Mashup Camp
Y Map Mashup CampJinho Jung
 
Yahoo Query Language: Select * from Internet
Yahoo Query Language: Select * from InternetYahoo Query Language: Select * from Internet
Yahoo Query Language: Select * from Internetdrgath
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScriptersgerbille
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015Fernando Daciuk
 
Drupal and the GeoSpatial Web
Drupal and the GeoSpatial WebDrupal and the GeoSpatial Web
Drupal and the GeoSpatial WebAndrew Turner
 
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Frédéric Harper
 

Similaire à Mobile And The Latency Trap (20)

Easy Web Data with YQL for Mobile Development
Easy Web Data with YQL  for Mobile DevelopmentEasy Web Data with YQL  for Mobile Development
Easy Web Data with YQL for Mobile Development
 
YQL - select * from internet version 2
YQL - select * from internet version 2YQL - select * from internet version 2
YQL - select * from internet version 2
 
YQL - A Query Language for the Web
YQL - A Query Language for the WebYQL - A Query Language for the Web
YQL - A Query Language for the Web
 
Yql Openhackday 2009
Yql Openhackday 2009Yql Openhackday 2009
Yql Openhackday 2009
 
YQL and YUI - Javascript from server to user
YQL and YUI - Javascript from server to userYQL and YUI - Javascript from server to user
YQL and YUI - Javascript from server to user
 
Seti 09
Seti 09Seti 09
Seti 09
 
How to avoid the latency trap and lessons about software design
How to avoid the latency trap and lessons  about software designHow to avoid the latency trap and lessons  about software design
How to avoid the latency trap and lessons about software design
 
Yql Intercon 09
Yql Intercon 09Yql Intercon 09
Yql Intercon 09
 
GeoTechTalk InkSatogaeri Project
GeoTechTalk InkSatogaeri ProjectGeoTechTalk InkSatogaeri Project
GeoTechTalk InkSatogaeri Project
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
Google MAP API
Google MAP APIGoogle MAP API
Google MAP API
 
Y Map Mashup Camp
Y Map Mashup CampY Map Mashup Camp
Y Map Mashup Camp
 
Yahoo Query Language: Select * from Internet
Yahoo Query Language: Select * from InternetYahoo Query Language: Select * from Internet
Yahoo Query Language: Select * from Internet
 
huhu
huhuhuhu
huhu
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScripters
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
 
Google Maps Api
Google Maps ApiGoogle Maps Api
Google Maps Api
 
Drupal and the GeoSpatial Web
Drupal and the GeoSpatial WebDrupal and the GeoSpatial Web
Drupal and the GeoSpatial Web
 
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
 
YQL & PHP
YQL & PHPYQL & PHP
YQL & PHP
 

Plus de Tom Croucher

Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev ConfTom Croucher
 
Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012 Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012 Tom Croucher
 
Using Node.js to improve the performance of Mobile apps and Mobile web
Using Node.js to improve  the performance of  Mobile apps and Mobile webUsing Node.js to improve  the performance of  Mobile apps and Mobile web
Using Node.js to improve the performance of Mobile apps and Mobile webTom Croucher
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Creating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent ConfCreating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent ConfTom Croucher
 
Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Tom Croucher
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleTom Croucher
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Lessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @MediaLessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @MediaTom Croucher
 
Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011Tom Croucher
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
How to stop writing spaghetti code
How to stop writing spaghetti codeHow to stop writing spaghetti code
How to stop writing spaghetti codeTom Croucher
 
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions SouthDoing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions SouthTom Croucher
 
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance MeetupDoing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance MeetupTom Croucher
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...Tom Croucher
 
How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010Tom Croucher
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming Tom Croucher
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetTom Croucher
 

Plus de Tom Croucher (20)

Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
 
Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012 Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012
 
Using Node.js to improve the performance of Mobile apps and Mobile web
Using Node.js to improve  the performance of  Mobile apps and Mobile webUsing Node.js to improve  the performance of  Mobile apps and Mobile web
Using Node.js to improve the performance of Mobile apps and Mobile web
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Creating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent ConfCreating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent Conf
 
Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Lessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @MediaLessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @Media
 
Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
How to stop writing spaghetti code
How to stop writing spaghetti codeHow to stop writing spaghetti code
How to stop writing spaghetti code
 
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions SouthDoing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
 
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance MeetupDoing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010
 
Sf perf
Sf perfSf perf
Sf perf
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
 

Dernier

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Dernier (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Mobile And The Latency Trap

  • 1. Mobile Data: How to avoid the latency trap when using web services
  • 3. What is the latency trap?
  • 5. Web Service My Server
  • 6. My Server Web Service
  • 8. Web Service AT&T
  • 9. Web Service AT&T
  • 11. Web Service AT&T
  • 12. Web Service AT&T
  • 13. Web Services AT&T
  • 15.
  • 17. Ofcom study • UK study into Wifi interfence (PDF) • Upto 90% of bandwidth used on protocol • Many other sources of interference • Baby monitors • Microwaves • Cordless Phones
  • 19. So how do we fix it?
  • 21. Web Services AT&T
  • 22. Web Services Server AT&T
  • 23. Reducing requests • Yahoo! Performance Guidelines • http://developer.yahoo.com/performance • Reduce web service requests • Bundle requests from device logically • Gzip all web service responses
  • 24. 2. Shape to packets
  • 25. Indiana Packet and the Byte of Doom
  • 26. Packet #1 Payload ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ..................................................................... ........................................................... Packet #2 Payload .
  • 27. 1 extra byte means 1 extra packet
  • 28. Reduce number of packets
  • 29. Packet sizes • Make sure static assets (JS, images, etc) fit in discrete packet boundaries • Don’t forget Gzip • Try and figure out ‘high latency’ connections to send inlined assets to • E.g. detect ‘iPhone’
  • 31. What is YQL? • Why is YQL bad-ass for mobile development? • How you can use YQL in mobile development • Examples
  • 33.
  • 34. dev
  • 35. dev
  • 36. dev
  • 37. dev
  • 38. dev
  • 39. dev
  • 40. dev
  • 41. dev
  • 42. dev
  • 43. dev
  • 44. dev
  • 45. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); …
  • 46. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } …
  • 47. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2
  • 48. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 49. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 50. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 51. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 52. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 53. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); ? … … if (flickcurl_prepare(fc, ? "flickr.photos.geo.correctLocation", parameters, count)) { … } … ? http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 ? http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 54. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); ? … … if (flickcurl_prepare(fc, ? "flickr.photos.geo.correctLocation", parameters, count)) { … } … ? http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 ? http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 55. Yahoo! My Yahoo! Mail Welcome, guest Sign In Search var map = new MY PROJECTS APIs & WEB SERVICES RESOURCES SUPPORT YDN Maps Suite AJAX Maps YMap(document.getElementById('map')); Yahoo! Maps Web Services - AJAX API Getting … READY TO GET STARTED? You aren't signed in Sign In Help dev Home The Tour Sign Up Explore currentGeoPoint = new Started Guide var Get an App ID Search YGeoPoint( _c.Lat, _c.Lon ); Learn the fundamentals of the Yahoo! Maps AJAX API and start creating your own maps. This page contains: Introduction and Prerequisites Flickr Services map.addMarker(currentGeoPoint); Yahoo! Maps Cheatsheets Yahoo! My Yahoo! Mail RECENT BLOG ARTICLES ? Examples Welcome, guest Sign In Display a Yahoo! Map API Documentation Feeds Your API Keys Apply for a new API Key Add controls to your Yahoo! Map Add a logger to a Yahoo! Map … Leonardo da Vinci: Hacker January 24, 2009 Search Place a marker on a Yahoo! Map Draw Polylines on a Yahoo! Map MY PROJECTS APIs & WEB SERVICES RESOURCES SUPPORT Whaddyathink? & the Yahoo! Application flickr.places.getPlaceTypes Place Smart Markers on a Yahoo! Map Add multiple custom markers on Yahoo! Map YDN Weather RSS Feed Platform January 22, 2009 Traffic information overlay Yahoo! Pipes RSS output information overlay Yahoo! Weather RSS Feed Making the new Yahoo! Currency Converter Yahoo! My Yahoo! Mail Welcome, guest Sign In Fetches a list of available place types for Flickr. Yahoo! Pipes JSON output information overlay accessible Local search results overlay Overlay GeoRSS XML data YMap … The Weather RSS feed enables you to get up-to-date weather information for your location. You can save this January 21, 2009 Search feed in My Yahoo! or your favorite feed aggregator, or incorporate the RSS data into your own web site or client Overlay custom objects at YGeoPoint location Authentication Overlay custom objects at YCoordPoint location if (flickcurl_prepare(fc, application. The Weather RSSRetrievingdynamically-generatedfrom based on zip code or Location ID. feed is a and displaying data feed Wikipedia with YQL PROJECTS MY APIs & WEB SERVICES RESOURCES SUPPORT ? Overlay polyline on Yahoo! Map This page describes the format of the 18, 2009 URL and the RSS response for developers. It contains these January request Export Yahoo! Map in GeoRSS format GeoRSS overlay with polyline This method does not require authentication. "flickr.photos.geo.correctLocation", sections: YDN Image Search Documentation for Yahoo! Search Web Services Get zoom level given radius from center Custom position of controls Arguments parameters, count)) { …Documentation for Yahoo! Search RSS Request Summary Image Search } READY TO GET STARTED? By applying for an Application ID for this service, you Change Marker Images Dynamically hereby agree to the Terms of Use Use YMapTypeControl to position map types api_key (Required) Other Features of the Yahoo! Maps AJAX API … Request Parameters RSS Response YEvent, YGeoRSS, YMarker Submitting Image Queries Rate Limit Get an App ID Your API application key. See here for moreTop-Level Elements details. The Image Search Web Service allows you to search the Internet for images. Terms of Service Channel Elements ? Support & Community Image Elements Example Response Item Elements Download all of the cheatsheets and example code in the Yahoo Request URL Maps API Reference Bundle. Condition Codes YAHOO! GROUPS DISCUSSIONS view all <place_types> Examples http://search.yahooapis.com/ImageSearchService/V1/imageSearch For detailed descriptions of the classes and methods in the API, place_type_id="22">neighbourhood</place_type> <place_type yahoo local search code in php Terms of Use check out v3.8 Reference Manual. http://search.yahooapis.com/ <place_type place_type_id="7">locality</place_type> <place_type place_type_id="9">county</place_type> Request parameters Tue, 27 Jan 2009 RSS Request My Web Search API shut down <place_type <place_type ImageSearchService/V1/imageSearch? place_type_id="8">region</place_type> Remaining, Supporting Classes place_type_id="12">country</place_type> See information on constructing REST queries The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add announcement Wed, 21 Jan 2009 Introduction and Prerequisites <place_type place_type_id="29">continent</place_type> (?). Multiple parameters are separated by an ampersand (&). </place_types> appid=YahooDemo&query=Corvette&results=2 parameters and values after a question mark The Yahoo! AJAX Maps API lets developers add maps to their web sites using DHTML and JavaScript®. the Weather RSS feed is Parameter appid Value string (required) Description The application ID. See Application IDs for more information. Re: Site Explorer API returns 999 Rate Limit The base URL for Maps ? Exceeded are fully embeddable and scriptable using the JavaScript programming language. Yahoo! Maps AS-Flash API's query string (required) The query to search for. Use + to include terms, - to exclude terms, and Wed, 21 Jan 2009 Error Codes built-in geocoder means that you can specify a physical address or latitude/longitude coordinates for your map's http://weather.yahooapis.com/forecastrss put quotes around "exact phrase". location, as you like. type all (default), any, or The kind of search to submit: Reminder: Old obsolete versions of Local In this section, Summary shows how to make an RSS request with different parameters; Request Parameters phrase Search (V1, V2) shutting do In order to create and test applications 100: Yahoo! Maps AJAX API, you'll need to use a supported summarizing those parameters. using Invalid API Key shows a table web all returns results with all query terms. Mon, 19 Jan 2009 The API key passed was not valid or has expired. browser: Firefox 2, Internet Explorer 6 or 7, Opera 9 or Safari 3. Newer versions of these browsers are also any returns results with one or more of the query terms. supported. You can code your JavaScript applications usingcurrently unavailable 105: Service your favorite text editor or IDE. phrase returns results containing the query terms as a phrase. SUMMARY results integer: default 10, The number of results to return. The requested service is temporarily unavailable. An application ID is required to use the Yahoo! Maps AJAX API. You can get an application ID here. max 50 The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add 111: Format "xxx" not found start integer: default 1 parameters and values after a question mark (?). Multiple parameters are separated by an starting result position to return (1-based). The finishing position (start The ampersand (&). For For best results, you should launch your web pagesrequested response format was not found. applications The from a web server. However, it's possible to run + results - 1) cannot exceed 1000. the Weather RSS feed there are two parameters: directly from your hard drive by double-clickingMethod This can be donefound 112: on them. "xxx" not by lowering the security settings in format any (default), bmp, Specifies the kind of image file to search for. the Internet Explorer browser or by setting the The requested method was not found. p for location. UniversalBrowserRead property in Firefox. gif, jpeg, png 114: Invalid SOAP envelope http://weather.yahooapis.com/ u for degrees units (Fahrenheit or Celsius). adult_ok no value or 1 The service filters out adult content by default. Enter a 1 to allow adult content. The SOAP envelope send in the requestlocationnot be parsed. required. Use this parameter to indicate the location for the weather forecast as a The could parameter p is Displaying a Yahoo! Map 115: Invalid XML-RPC Method Call forecastrss?p=FRXX0076&u=c zip code or Location ID. coloration any (default), color, The service returns only the images of the coloration specified (color or bw black-and-white). All the API classes and methods necessary to interact with Yahoo! Mapsdocument couldyour application when The XML-RPC request are availablehttp://weather.yahooapis.com/forecastrss?p=location to not be parsed. site string: default no A domain to restrict your searches to (e.g. www.yahoo.com). You may you include Yahoo! Maps AJAX API library in your web page.This example uses the demonstration application value submit up to 30 values (site=www.yahoo.com&site=www.cnn.com). ID "YD-eQRpTl0_JX2E95l_xAFs5UwZUlNQhhn7lj1H"; you cannot use this Application Forand must requestweather for Yahoo! Headquarters in Sunnyvale, CA, use the zip code for Sunnyvale ID example, to get one here. API Explorer (94089): output string: xml The format for the output. If json is requested, the results will be returned (default), json, php in JSON format. If php is requested, the results will be returned in Serialized PHP format. <html> API Explorer : flickr.places.getPlaceTypes http://weather.yahooapis.com/forecastrss?p=94089 <head> callback string The name of the callback function to wrap around the JSON data. The <b><script type="text/javascript" Or use the Location ID for Sunnyvale (USCA1116): following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has
  • 56. var map = new YMap(document.getElementById('map')); … dev var currentGeoPoint = new YGeoPoint( _c.Lat, _c.Lon ); map.addMarker(currentGeoPoint); … … if (flickcurl_prepare(fc, "flickr.photos.geo.correctLocation", parameters, count)) { … } … http://search.yahooapis.com/ ImageSearchService/V1/imageSearch? appid=YahooDemo&query=Corvette&results=2 http://weather.yahooapis.com/ forecastrss?p=FRXX0076&u=c
  • 57. dev YQL
  • 58. dev YQL
  • 59. dev Bindings YQL
  • 60. YQL • Unified interface to Web services • Self-describing to avoid documentation • Uses a common way to return data
  • 61. YQL is like SQL • Uses SQL verbs • Uses SQL syntax • Returns rows of data • Self-describing • show tables; • desc table;
  • 62. Verbs • show - show tables; • desc - desc search.web; • select - select * from flickr.photos.recent; • use • insert • update • delete
  • 64. Web Services Server AT&T
  • 66. select * from flickr.photos.info where photo_id in (select id from flickr.photos.search where query = “lolcats”)
  • 67. Conclusion • Latency hurts anything wireless • Fight latency by reducing connections • Fight latency by reducing the number of unnecessary packets • YQL can help you bundle your requests to mobile device without a backend
  • 68. follow me on twitter.com/sh1mmer Slides? Feedback? www.speakerrate.com/sh1mmer