adrianco / spigo

Simulate Protocol Interactions in Go
Apache License 2.0
1.12k stars 111 forks source link

Make architecture enter time-lapsed #44

Open kkemple opened 9 years ago

kkemple commented 9 years ago

Each node and edge has a timestamp, it would be nice to render each node individually so that the user could watch the architecture grow over a timed period. Nodes and edges are already sorted: https://github.com/adrianco/spigo/blob/master/ui/js/stores/chart.js#L87

nodes = sortBy(nodes, 'timestamp');
edges = sortBy(edges, 'timestamp');

this.cache[this.architecture + step] = {nodes, edges};

The rendering code for the chart just needs to be refactored and adjusted to render each node individually: https://github.com/adrianco/spigo/blob/master/ui/js/chart/index.js#L75-L128

adrianco commented 8 years ago

The free Gephi tool has this capability. The GEXF format specifies it, next step is change graphml to GEXF. Gephi is a pain to install, depends on Java 1.6 :-(

adrianco commented 8 years ago

Here's the XML format for dynamic graphs using GEXF https://gephi.org/gexf/format/dynamics.html

adrianco commented 8 years ago

Next task is to change the GraphML format output (-g option) to generate GEXF instead.

adrianco commented 8 years ago

Changing the current D3 UI code, we would need to look at the timestamps in the graph entries for nodes, edges etc. make sure they are sorted or deal with small out of order updates, and provide a way to specify when to start and stop, and how fast to replay. Ideally reset the graph and loop over the section.

Graphs contain four entry types: nodes, edges, delete nodes, and forget edges