Crossing the world - new feature on Crosstips

23 May 2009   1 comment   Django

http://crosstips.org/crossing-the-world/

Mind That Age!

This blog post is 8 years old! Most likely, its content is outdated. Especially if it's technical.

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!

UPDATE

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

Follow @peterbe on Twitter

Comments

RichardH
Hi Peter,
Thanks for sharing the idea.
See you at EuroPython?
Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
Sequences in PostgreSQL and rolling back transactions 12 May 2009
Next:
Introducing django-spellcorrector 28 May 2009
Related by Keyword:
Google's new Page Speed Online hard to beat 04 April 2011
Word Whomp solvers love Crosstips 22 April 2010
The awesomest way possible to serve your static stuff in Django with Nginx 24 March 2010
Simple interface for Crosstips 08 April 2009
British or American English or just English 18 March 2009
Related by Text:
Crosstips now has sparklines 29 April 2009
Simple interface for Crosstips 08 April 2009
Word Whomp solvers love Crosstips 22 April 2010
My first iPhone web app - Crosstips iPhone interface 01 July 2009
AJAX accelerated web widgets 23 June 2005