Crossing the world - new feature on Crosstips

23 May 2009   1 comment   Django

Powered by Fusion×

Crossing the world - new feature on Crosstips I've added a very fun new feature on Crosstips called Crossing the world which shows real-time searches happening all over the world. Admittedly the traffic on Crosstips isn't particularly high, (At the time of writing, 1 search every 2 minutes) so you might have to sit there for a while until something happens. It's strangely addictive to watch it.

To do this I had to use all sorts of buzz words. AJAX, function cache decorators, GeoIP and Google Maps. I'm currently using the free version of GeoIP City Lite which seems to work on a large majority of all captured IP addresses. And since the map is sufficiently zoomed out you can't really tell how inaccurate it is.

One little detail I'm quite proud of is how the AJAX code understands how to change interval between lookups. Each time the server responds with something, the interval is reduced down but if there aren't any new searches the interval slowly increases again. This is done to minimize the number of useless server requests but at the same time try to make it react often if there are plenty of things to show. The next feature to add is Comet (like AJAX but push instead of pull).

Now if we could only get some more action on the site!! Tell all your grand-people to use this site when they get stuck on solving crossword puzzles!


I've just learnt that GeoIP is already shipped in GeoDjango so I've basically reinvented half a wheel :(


Hi Peter,
Thanks for sharing the idea.
See you at EuroPython?

Your email will never ever be published

Related posts

Sequences in PostgreSQL and rolling back transactions 12 May 2009
Introducing django-spellcorrector 28 May 2009
Related by keywords:
The awesomest way possible to serve your static stuff in Django with Nginx 24 March 2010 - Look up the location from an IP 01 March 2008
British or American English or just English 18 March 2009
Google's new Page Speed Online hard to beat 04 April 2011
GMapEZ - Google Maps API too complicated for you? 12 July 2006
Word Whomp solvers love Crosstips 22 April 2010
Simple interface for Crosstips 08 April 2009