Skip to content

More human readable/editable topologies #778

@sporksmith

Description

@sporksmith

Broken out of #773. This is lowish priority, but we can consolidate ideas/discussion on the topic here.

Today the topologies in our examples look something like:

<topology><![CDATA[<?xml version="1.0" encoding="utf-8"?><graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key attr.name="packetloss" attr.type="double" for="edge" id="d6" />
  <key attr.name="latency" attr.type="double" for="edge" id="d5" />
  <key attr.name="packetloss" attr.type="double" for="node" id="d4" />
  <key attr.name="countrycode" attr.type="string" for="node" id="d3" />
  <key attr.name="bandwidthdown" attr.type="int" for="node" id="d2" />
  <key attr.name="bandwidthup" attr.type="int" for="node" id="d1" />
  <key attr.name="ip" attr.type="string" for="node" id="d0" />
  <graph edgedefault="undirected">
    <node id="isp">
      <data key="d0">0.0.0.0</data>
      <data key="d1">2251</data>
      <data key="d2">17038</data>
      <data key="d3">US</data>
      <data key="d4">0.0</data>
    </node>
    <edge source="isp" target="isp">
      <data key="d5">50.0</data>
      <data key="d6">0.01</data>
    </edge>
  </graph>
</graphml>
]]></topology>

The graphml format is generally visually noisy, and the networkx graphml exporter chooses opaque attribute-id's like "d6", forcing a reader to have to look back and forth between the data tags and key tags to understand what's happening.

graphml was chosen in part because it's a format that many tools understand. It's particularly useful that the networkx python package understands it (for generating graphs), and that the igraph library can import it (for use internally in Shadow).

Metadata

Metadata

Assignees

Labels

Component: MainComposing the core Shadow executable

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions