Extensive mesh

After an invigorating AMC2010, and a very fruitful HOT MESH conference session and media lab presence, I’m back at my daily work of code wrangling, system adminstering, etc.  But this afternoon I had the chance to extend the North Corktown community wireless network, with Dan from OTI and a few freshly-prepared wireless routers.

Back story

I live in North Corktown, a Detroit neighborhood about two miles from downtown.  I used to live up the street and had a cable modem, but when I moved a few blocks away and tried to transfer my account, the cable company refused to install service.  After a struggle, I ended up with a barely-broadband DSL connection.  Many of my neighbors have had similar problems in trying to get internet access.  To solve this, I set up a small network of meshed routers to repeat my signal down my block.  Also, a neighbor up the street from me was willing to share his connection with nearby residents, so I set him up a mesh router as well.  Hot Mesh was born, and North Corktown got a little bit of free internet.  People started noticing the signal, random cars started hanging out in front of my house, and I got to meet my new neighbors.

Enter the Spaulding Court

Spaulding Court is an apartment complex.  I live across the street from it.  After being neglected by an absentee landlord for a decade or so, some neighbors started getting serious with it and are fixing the place up.  Read more about this whole process in a Detroit YES! thread or via the official Spaulding Court web presence.

The US Social Forum served as a catalyst for Spaulding Court.  It’s playing host to a couple dozen tent-dwellers and temporary apartment tenants, as well as one long-term tenant.  Read a slightly-tongue-in-cheek mise-en-scène by my neighbor (and community wireless participant) Patrick.  The project’s organizers were interested in providing internet access to the new residents, and I was willing to help.

A few days ago, we deployed a few more nodes and extended the wireless coverage to the west.   The network now solidly covers about three blocks and is served by two residential DSL connections and a cable modem shared between nine wireless mesh nodes.  All of the new infrastructure will stay in place for the neighborhood to benefit from.

Technical Details

Take a look at the network map and notice the distance between nodes — even with a few trees in the way, we have a couple very large gaps between gateways and repeaters.  The node in the middle, codenamed “landyacht” and stowed in the pantry of an Airstream trailer, acts as a repeater that would bridge traffic if either of the gateways had a problem.  Landyacht is often out of service due to power issues.  The other out-of-service node, Courteous, is sitting on my table waiting to receive a specially-crafted XSS payload.

Both Dan and I were surprised at the power of these little 30mW routers: some of them are traversing multiple empty lots.  We’d thought that we would’ve needed some cantennas, but it wasn’t needed.

[update]   The North Corktown network is actually made up of a few separate Open-Mesh networks:  the one linked to above uses another network as a backhaul, and any other network can use it as a backhaul.  This means that anyone can set up their own nodes, with or without an internet connection, and easily extend the network.  These new networks can have completely different settings (i.e. you can set a password for your own personal network, or limit bandwidth, or give it a funny name).

The Future

This is my neighborhood’s network.  It worked well because I knew quite a few neighbors who were interested, and I was able to school them in mesh networking theory over and over again until they were all comfortable participating.  Many neighborhoods might not have the advantage of a resident community wifi zealot, but it only takes a few hours of playing with the hardware and learning some networking concepts to become a very capable mesh network technician.

I’d like to see the next DiscoTech happen alongside a mesh network install and computer training /giveaway.  I think there’s a nice pile of computers left around after the US Social Forum that ought to be put to good use.

AMC 2010 liveblogging: gleaning tweets with node.js and mysql

A bit about my recent work:

As the web dev for the Allied Media Conference, I’ve been tasked with creating a system for participants to liveblog about all the sessions at this year’s conference.  I decided on setting up a three-part system: a tweet searcher+archiver, a JSON server, and the existing 2010 AMC and USSF discussion message board software.

  • Tweet searcher+archiver: a node.js app that reads a filtered twitter feed from the Streaming Twitter API (using a version of twitter-node, separates out relevant hashtags (each relating to a conference session) and stores them in a MySQL db. (80% complete)
  • Tweet server: another node.js app, this time a HTTP server using djangode, that responds to queries for certain hashtags and returns a JSON stream of tweets with that tag, or alternatively returns a “last tweet” timestamp for comparison on the frontend. (10% complete)
  • Frontend: a modified Drupal forum setup with a special field on topics that offers the relevant hashtag as an element on the page.  Javascript by PaulH will form a HTTP request using that hashtag to retrieve tweets from the tweet server and, based on the twitter timestamp, intertwine them with the topic replies. (80% complete)

This may seem like a complicated system.  Why not just draw tweets using clientside javascript during pageload?  Why use bespoke node.js servers instead of doing a Drupal implementation or buying cloud services?  Respectively, temporariness and efficiency.  With our setup, the twitter conversation isn’t temporary anymore:  we can archive the conversation and guarantee that it lasts for future viewers (no need to rely on twitter to keep on serving tweets).  It’s also more efficient: for one thing, it’s only one stream request from twitter (maybe two if i want to do redundancy) instead of a bunch of in-browser requests, and the streaming API seems to be more timely and reliable.  Node.js lends itself very well to this type of system.

While the current implementation is definitely off-the-cuff hackish, I’m going to work on generalizing the code and will release it on github afterwards.  If anyone is interested in collaboration, please comment!