<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>java rants &#187; yahoo</title> <atom:link href="http://www.javarants.com/category/yahoo/feed/" rel="self" type="application/rss+xml" /><link>http://www.javarants.com</link> <description>Rants about Java and other internet technologies by Sam Pullara</description> <lastBuildDate>Sun, 09 Oct 2011 23:29:31 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Off-loading real work to YQL instead of using your server</title><link>http://www.javarants.com/2010/05/22/off-loading-real-work-to-yql-instead-of-using-your-server/</link> <comments>http://www.javarants.com/2010/05/22/off-loading-real-work-to-yql-instead-of-using-your-server/#comments</comments> <pubDate>Sun, 23 May 2010 01:23:24 +0000</pubDate> <dc:creator>Sam Pullara</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[yahoo]]></category> <guid
isPermaLink="false">http://www.javarants.com/?p=1305</guid> <description><![CDATA[Just saw a cool blogpost about summing up all your subscribers on RSS, Facebook and Twitter. The only issue is that it requires PHP to work. I decided to quickly rewrite it as a YQL Execute table instead. So rather &#8230; <a
href="http://www.javarants.com/2010/05/22/off-loading-real-work-to-yql-instead-of-using-your-server/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Just saw a cool <a
href="http://tutorialzine.com/2010/05/showing-facebook-twitter-rss-stats-jquery-yql/">blogpost about summing up all your subscribers on RSS, Facebook and Twitter</a>.  The only issue is that it requires PHP to work. I decided to quickly rewrite it as a YQL Execute table instead.  So rather than write that code in PHP, here is the <a
href="http://javarants.com/yql/stats.xml">code for my table</a>.  Pretty simple. You pass it a URL for Feedburner, an id for Facebook and an id for Twitter and it generates some simple HTML for you to display as a widget.</p><p>The html page that he uses didn&#8217;t have to be changed that much, you can find the same demo that he uses <a
href="http://javarants.com/subscriberdemo.html">here</a>.  This was really quick so right now there is no way to leave out one without it freaking out.  This is more a tech demo than it is a real solution.</p> ]]></content:encoded> <wfw:commentRss>http://www.javarants.com/2010/05/22/off-loading-real-work-to-yql-instead-of-using-your-server/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>YQL opens up 3rd-party web service table definitions to developers</title><link>http://www.javarants.com/2009/02/05/yql-opens-up-3rd-party-web-service-table-definitions-to-developers/</link> <comments>http://www.javarants.com/2009/02/05/yql-opens-up-3rd-party-web-service-table-definitions-to-developers/#comments</comments> <pubDate>Thu, 05 Feb 2009 20:55:51 +0000</pubDate> <dc:creator>Sam Pullara</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[yahoo]]></category> <category><![CDATA[yql]]></category> <guid
isPermaLink="false">http://www.javarants.com/?p=1153</guid> <description><![CDATA[The Yahoo! Query Language aspires to be the last web service API that the normal developer will ever have to learn. By default we implement 50+ tables that grab data both from Yahoo! web services, some 3rd party web services &#8230; <a
href="http://www.javarants.com/2009/02/05/yql-opens-up-3rd-party-web-service-table-definitions-to-developers/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>The <a
href="http://developer.yahoo.com/yql/">Yahoo! Query Language</a> aspires to be the last web service API that the normal developer will ever have to learn.  By default we implement 50+ tables that grab data both from Yahoo! web services, some 3rd party web services and then the web at large using our dynamic tables that allow you specify a data type and a url.  However, those dynamic APIs limit the YQL user to a very flexible but ultimately hard to work with API without the benefit of the structure found in the other tables that we offer.</p><p>Today <a
href="http://www.yqlblog.net/blog/2009/02/05/open-data-tables-added-to-yql/">YQL introduced</a> a new feature that allows 3rd parties to define new tables and then share those table definitions with whomever they like for them to use.  For example, let&#8217;s say you are the New York Times or you are a developer that likes the New York Times APIs and would like to make them more accessible to someone using YQL.  Yesterday, they released the article search API, so I will use that one among others as an example, to get an api-key to execute these examples go to their <a
href="http://developer.nytimes.com">developer site</a>.  This is a pretty sophisticated API that allows you to search using a variety of parameters.  If you were to use YQL without modification, you would simply use the dynamic JSON endpoint to parse out the results from their service.  The big issue with this though is that you would be unable to easily construct the URLs required and would have to write that code that collected all the parameters and created the URL.  If you had a YQL table, those parameters would be defined and how they are expressed in the URL codified and you would be able to individually address the keys.<br
/> <span
id="more-1153"></span><br
/> So without this ability you would use something like this:</p><p><code>select * from json where url='http://api.nytimes.com/svc/search/v1/article?api-key=...<br
/> &amp;query=yahoo&amp;begin_date=19990112&amp;end_date=19993112' and<br
/> itemPath='json.results'</code></p><p>If we instead defined the API using the <a
href="http://developer.yahoo.com/yql/guide/yql-opentables-chapter.html">YQL open data tables specification</a> you would be able to do this (by the way, don&#8217;t read the headlines, you&#8217;ll just be depressed):</p><p><code>use 'http://www.javarants.com/nyt/nyt.article.search.xml' as articles;<br
/> select * from articles where apikey='...' and query='yahoo' and begin_date='19990112' and<br
/> end_date='19993112'</code></p><p>Why is this superior?  For a number of reasons.  In the second case not only does it make it easier for anyone to use it, it also brings those keys from the query into columns which allows you to do joins that you cannot do with the first abstraction.  Here is an example join:</p><p><code>select * from bs where apikey='...' and query in ('yahoo', 'google', 'microsoft') and begin_date='19990112' and end_date='20000101'</code></p><p>This will actually do 3 searches for you in parallel and then return the combined result.  By creating a YQL open table we can really off-load processing that you would normally do on your client or server to the YQL engine.  You&#8217;ll note with that query that the user-time spent is actually about half or less than the actual service-time thus drastically decreasing the latency through asynchronous processing.</p><p>One of the really nice APIs out there is <a
href="http://friendfeed.com/api/">FriendFeed&#8217;s API</a>.  It really is very well designed and easily works with straight-forward table definitions.  Here is an example of how to get the public feed:</p><p><code>use 'http://www.javarants.com/friendfeed/friendfeed.feeds.xml' as ff;<br
/> select * from ff</code><a
href="http://developer.yahoo.com/yql/console/?q=use%20'http%3A%2F%2Fwww.javarants.com%2Ffriendfeed%2Ffriendfeed.feeds.xml'%20as%20ff%3B%0Aselect%20*%20from%20ff"><small>console</small></a></p><p>By defining different endpoints with the same table definition we will automatically select the correct API based on the keys included in the query.  Using that same table we can also get my public entries from twitter:</p><p><code>select * from ff where nickname='spullara' and service='twitter'</code><a
href="http://developer.yahoo.com/yql/console/?q=use%20'http%3A%2F%2Fwww.javarants.com%2Ffriendfeed%2Ffriendfeed.feeds.xml'%20as%20ff%3B%0Aselect%20*%20from%20ff%20where%20nickname%3D'spullara'%20and%20service%3D'twitter'"><small>console</small></a></p><p>This won&#8217;t include my private entries though.  However, if you had my remotekey you could generate and pass YQL the authorization header required and it would pass it on to authenticate the API call.  Another popular example that has been on the forums is the ability to use <a
href="http://weather.com">weather.com</a>&#8216;s API to tease out international locations.  That is actually really easy and you can even use that data to join with their weather forecasts.  Here is an example where we pull the weather for all the Moscow&#8217;s of the world:</p><p><code>use 'http://www.javarants.com/weather/weather.search.xml' as ws;use 'http://www.javarants.com/weather/weather.local.xml' as wl;<br
/> select * from wl where location in (select id from ws where query='moscow')</code><a
href="http://developer.yahoo.com/yql/console/?q=use%20'http%3A%2F%2Fwww.javarants.com%2Fweather%2Fweather.search.xml'%20as%20ws%3Buse%20'http%3A%2F%2Fwww.javarants.com%2Fweather%2Fweather.local.xml'%20as%20wl%3B%0Aselect%20*%20from%20wl%20where%20location%20in%20(select%20id%20from%20ws%20where%20query%3D'moscow')"><small>console</small></a></p><p>I&#8217;ve actually started up a project on <a
href="http://github.com">github</a> called <a
href="http://github.com/spullara/yql-tables/tree/master">yql-tables</a> to store useful table definitions and will be taking submissions from the community. You can try them out by &#8216;use&#8217;ing them directly from the git repository or by pulling them onto your own server accessible from the YQL servers.</p> ]]></content:encoded> <wfw:commentRss>http://www.javarants.com/2009/02/05/yql-opens-up-3rd-party-web-service-table-definitions-to-developers/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> </channel> </rss>
