Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Network geographic activity visualization, made with Processing
2 points by valverde on Dec 28, 2010 | hide | past | favorite | 4 comments
Processing (processing.org) is such a great tool, I decided to spend some time learning about it during the holidays. Here's what I came up with:

http://www.youtube.com/watch?v=S4ehmI2YVdQ

The globe you see in the video is rendered in real-time, with a script polling a webserver via a PHP script which simply runs 'netstat | grep ":80" | grep "ESTABLISHED"' and returns whatever comes out. In other words, it returns a list of active HTTP connections to that specific web server.

After gathering a list of IPs, I find their geographic coordinates via Maxmind's GeoLiteCity database (it's free and pretty good :). Finally, I plot each connection as a line which fades as it goes further. This fading is important, because it allows to distinguish locations with more connections from the rest.

This was inspired by a very similar visualization which Google has in a big screen at the GooglePlex, but I couldn't find a video of it.

Comments and other visualizations are much appreciated.



Very cool. I'm a big fan of Processing, it makes doing simple graphical stuff with programming pretty easy. Just out of curiousity, what platform did you do that on? Did you have to use an external OpenGL library or some other 3D rendering outside of Processing's core?


I tried to use some of the more advanced OpenGL stuff, but in the end I used the standard P3D canvas (which is part of Processing's core).

I used the "Video" library to make a video out of the animation, and Maxmind's Java library for geolocation. Other than that, it's pure Processing.

>what platform did you do that on?

The video was rendered on a Mac. Is that what you meant?


Yeah, that's exactly what I was wondering. Last time I tried playing with the Processing's video API on Linux there were some problems IIRC. That was a long time ago, so it's probably fixed now.

Anyway, cool visualization!





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: