[Babel-users] Aggregating and visualising data from multiple Babel routers

Baptiste Jonglez baptiste.jonglez at ens-lyon.fr
Thu Jul 3 15:11:56 UTC 2014


Dear Babel users,

Currently, babelweb only displays data taken from a single Babel router.
It would be nice to aggregate data taken from multiple Babel routers, in
order to build a single graph.  I believe this has been a planned feature
of Babelweb for quite some time, but as always, time is a scarce resource :)

I just wrote a proof-of-concept in Python, to get a feeling on how this
can be done.  A first version of the code is available here:

  http://ze.polyno.me/babel/babelcli.py

Example usage:

  python3 babelcli.py localhost:33123 other_router:3333 172.23.184.{1..9}:3333

The script continuously generates a graphviz file at "/tmp/babel.dot"
(in case you're wondering, yes, this is hardcoded).
You can then use graphviz as the poor man's babelweb, since it watches the
input file for updates:

  dot -T x11 /tmp/babel.dot

Depending on your topology, you might want to use "neato" instead of
"dot" (see the respective man pages).

Example output:

  http://ze.polyno.me/babel/babelcli-example.svg

The red nodes are the supervised routers, plain edges are "sure", dotted
edges are "tentative" (see below).  The width of an edge reflects the
number of installed routes going through this edge.  Note that an edge
"A → B" means "A hears B", which you can interpret as either "A may
receive routes from B" or equivalently "A may send traffic to B".


As in Babelweb, there are two kind of edges: "sure" edges, derived from
neighbours, and "tentative" edges, derived from routes.  The basic idea
behind tentative edges: when we receive a route from a neighbour X, we can
safely assume that X has a path to the router originating the route.  In
babelweb, we assume a one-hop path; here, by combining data from multiple
vantage points, we are able to do a bit better.

The method for building the graph is actually pretty simple:

- build all "sure" and "tentative" edges learnt from the supervised
  routers (using, for each supervised router, the same method as babelweb)
- remove incorrect or useless tentative edges

Currently, "incorrect or useless tentative edge" is defined as "the source
of this edge is a supervised router".  The idea is that we have better
data available, since we are supervising the router.


Possible improvements:

- use heuristics to further improve correctness and/or completeness
- use the neighbour cost (either for cosmetics, or more interesting, for
  detecting unidirectional links or guessing reverse edges)
- correctly handle the case where we have multiple links between neighbours
- we currently rebuild the whole graph at each update: it's possible to be
  way more efficient


Any comments?  Can you think of a better way to combine the data?

Thanks,
Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/babel-users/attachments/20140704/7fa0d09e/attachment.sig>


More information about the Babel-users mailing list