POX and Gephi graph streaming / visualization
POX has an unsupported visualization GUI in the form of POXDesk, but today it got another somewhat different option. Gephi is a great (open source) graph visualization and manipulation package. It has a plugin for streaming graphs in and out over HTTP, and POX’s new misc.gephi_topo component uses this to stream switches, links, and (optionally) hosts to it. Once the graph is in Gephi, you can export it to graph file formats, analyze it in a bunch of different ways, just look at it, render it as SVG, and so on. Read on for more info and a screenshot.
Although the code is based on POXDesk, the ability to view hosts is new (it’d be nice to port it back to POXDesk, though!). Adding them in required a bit of improvement to the host_tracker component — specifically adding a HostEvent. host_tracker could still use some work to get it a little more consistent with changes in POX that have happened over the last couple of years, but it’s cool that it still works, and with the addition of events, it should be more useful and easier to use.
This also serves as an example of creating arbitrary socket servers using IOWorker. In theory, Gephi graph streaming is HTTP, but the POX component currently just streams the graph blindly to anything that connects.