Step 1: Extract Graphing Code
To start with the 2-project refactoring, I created a new (third) project: Timewise. This node.js project periodically polls a set of configurable endpoints, each of which serve up a single XML page of RRD’s built-in serialization. The XML gets read in and deserialized to a new RRD file, and this vastly simplifies the postgres replication hacks I had in place for Power Hungry. For now, the project consists only of code I yanked out of Hot or Not, but and right now that’s the only project it serves. This refactoring, though, sets up Power Hungry for the refactoring (to RRD) that is coming its way.