One of the common issues of dealing with the Apache Cassandra database is how to do secondary indexes of columns within a row. This post will discuss one technique, far from the only one, for how to manage this. One thing that experienced Cassandra users will hopefully find interesting is that SuperColumns will not be used at all to accomplish this in order to avoid the complexity and limitations they introduce. Also, it should also be pointed out that Cassandra will have native secondary index support in the upcoming 0.7 release (see CASSANDRA-749), which will make this all much simpler, but the idea is still valid for how to think about about this sort of thing, and will still be applicable in some situations. Once that version gets closer to release, I'll do a follow up post looking at it.
So, to start, let's assume a scenario where we have a container (ex. a group) of items (ex. users in the group), each of which has an arbitrary set of properties, which are searchable by value in the context of the container. Items might also be members of other containers, but we won't explicitly deal with that in this scenario.


The installation of the navigation system took place of the course of two days in the garage of my apartment building back in October of 2001. One of my neighbors became very concerned when she saw me disassembling the interior of my car and alerted the building security. Apparently she thought I was turning the car into some sort of terrorist weapon, go figure. Most of this project was documented along with a lot of other interesting information on the now-defunct openbmw.org site and a Yahoo Group. At the time, if you didn't purchase the car from the factory with the navigation system installed, BMW refusted to install it afterwords, claiming that it wasn't possible, and would refuse to provide information to people who wanted to install it themselves. I found a CD-ROM database of part numbers and identified every part used by the navigation system and ordered them from the repair departments of three different dealerships over the course of several months. Eventually, after a number of people printed out the instructions from my site and went to their local dealers asking them to perform the retrofit, BMW relented and packaged all the parts into an installation kit that could be installed by the repair centers.
The car computer project was primarily focused on building an interface board that would tap into the navigation system and allow an in-car PC to take over the display and interface with the dashboard knobs and buttons. I designed the circuit boards and sent the files to China to be manufactured and assembled. When I got the boards delivered back to me, I'd usually find at least one chip would be mounted incorrectly and I'd have to resolder it by hand, which would unfortunately often result in me ruining the board. Once the interface board was installed, I used a trunk-mounted Linux PC running software that I'd written on top of Mozilla to provide a user interface for things like an MP3 jukebox and web access. Maybe I'll turn it into an iPhone app at some point.
Navigation Installation Project - 2001
http://www.flickr.com/photos/edanuff/sets/72157618942758407/
Car Computer Project - 2004/2005
http://www.flickr.com/photos/edanuff/sets/72157619029279570/




Recent Comments