[Greasemonkey] Ethical XMLHTTPRequest

Brady Joslin brady.joslin at gmail.com
Mon Apr 18 16:37:50 EDT 2005


Jon Udell posted on his blog the other day a meme tracking
greasemonkey user script that pinged delicious and Bloglines,
returning the number of citations and displaying the results at the
top of every page.  This caused some to question the ethics of
creating a call to the REST services for all users of the script upon
viewing any page in the browser due to the ramifications of that
amount of traffic.

http://weblog.infoworld.com/udell/2005/04/11.html#a1212

Pondering how to lighten the load on delicious and similar services, I
remembered the reference to the Coral network on Greasemonkey's Mozdev
page.  For the uninitiated, the site claims...Coral is peer-to-peer
content distribution network, comprised of a world-wide network of web
proxies and nameservers. It allows a user to run a web site that
offers high performance and meets huge demand, all for the price of a
$50/month cable modem...all capable by simply appending a string to
the end of the hostname of a URL

http://coralcdn.org/

Well, why can't we simply use Coral with the XMLHTTPRequest calls to
delicious in this case?  Of course we can.  I altered Jon's script on
my machine, such that

var deliciousUrl = 'http://del.icio.us.nyud.net:8090/url/?url=' + currentPage;

Simply appending .nyud.net:8090 to the url removes the load from
delicious and retrieves the data from Coral instead. While this causes
the numerical counts returned to be slightly less up to date, I have
found them to relevant enough to fit my needs.

This can (perhaps should) be a suggested methodology for retrieving
data from sites where it is likely that your script will initiate
significant traffic, especially if handed to the public.

Cheers,

-- 
Brady Joslin


More information about the Greasemonkey mailing list