
webtf
wtf is a specialized web server that also acts as client to twitter. wtf acts as a "compiler" for the browser, responding to requests with optimized "pre-cooked" JavaScript canvas directives---think of it as assembly language for the code in Webkit that interprets canvas tag data.
For example:
C.beginPath();C.arc(799,167,8,0,p2,true);C.fill();
draw the circles. All computations like coordinate and object positioning is done by the wtf, not the browser.
wtf responds to requests in this format:
/users/{user1,user2...} /list/{name}/{listname}
graphics/layout parameters are:
b={begin time, YYYY-MM-DD}
e={end time, YYYY-MM-DD}
c={max tweetcout}
m={marker width, pixels}
p={picture width, pixels}
l={line height, pixels}
For example:
/users/ajstarks,nytimes,%23golang,cnn?b=2009-12-05&e=2009-12-09&c=100&m=12&p=48&l=24&s=60
builds a visualization of the twitter update frequency for the users ajstarks, nytimes, cnn, along with the mentions of the #golang hashtag during the period between December 5-9, 2009 (UTC), up to 100 tweets/ user, with a marker width of 12 pixels, a picture width of 48 pixels, line width of 24 pixels, with spacing of 60 pixels.
/list/ajstarks/msm?c=100
shows the update frequency for the members of the twitter list @ajstarks/msm
Go language features exercised by wtf include http processing, string parsing, time computations, data unmarshalling, and network io.
wtf takes about 5.6 seconds to build a tweetfreq from 10 users (abcnews,nytimes,wsj,cbsnews,cnn,foxnews,techcrunch,techmeme,arstechnica,slashdot) consisting of 500 tweets.
The bulk of the time is waiting for the twitter search engine to respond.
More on TweetFreq can be found at:
http://www.scribd.com/doc/22231126/TweetFreq-Visualizing-Twitter-update-behavior
Project Information
- License: MIT License
- 5 stars
- hg-based source control