~qaul/community

Research & Proposition: Visualization of the qaul.net Mesh-Network-Topology

Mathias Jud
Details
Message ID
<bb2ad8ed-4698-733b-740b-ef5950bae756@open-communication.net>
DKIM signature
pass
Download raw message
One of the questions for debugging and user feedback is how to visualize
the topography of the qaul.net network.

There are two different use cases for which we need to do that.

A: for each and every person as a feedback how one is connected to the
network
B: for the development to debug the network.


# A
In order to give each user feedback how she/he is interconnected the
following GUI measures shall be implemented:

Who is available in the network: Visible via the user identicon/icon

* Is this user online?
  * This can be visualized via dot in the interface
? How well am I connected to this person
? via which interfaces am I connected with this person
  * still a question how we could give feedback on that. e.g. This could
be an additional information when viewing the user profile.

Information on the interconnectivity for each netmod interface, the GUI
shall provide the following information:

* The available interfaces shall be shown in the right-sided context bar.
* The total number of connected users via each netmod interface shall be
visible in the GUI.
? who is connected via this netmod interface.
  * display over which interface a user is reachable.
  * display the last interconnection over which interface be visible.
? graphical visualization of all single-hop neighbors and the nodes
connected to them for each interface.



# B
For the development of the routing protocol, for debugging and for a
better understanding of the network we need an visualization of the
entire network topology. As BATMAN does (in comparison to link-state
protocols) not calculate the entire network, each node only has its
local view. We need to combine these views to display the network
visualization.

Here some examples from the past and other projects.


## qaul.net 1.0 Network Topography Visualization

As qaul.net 1.0 used the link-state routing protocol OLSR, it could
visualize the entire network directly from the routing information of
it's own node.
The routing information was converted to JSON visualized via a D3
webpage. The JSON structure is very simple. It contains an array of
links between nodes and a collection of nodes.

* JSON example:
https://git.open-communication.net/qaul/qaul.net/-/blob/release-1.0.0/GUI/www_GUI-test_static/gettopology.json
* Network visualization page:
https://git.open-communication.net/qaul/qaul.net/-/blob/release-1.0.0/GUI/www/network.html


## BATMAN way of visualizing the network
In the old days the BATMAN visualization server, was a dedicated,
centralized server, where all nodes could send the information of their
own interconnectivity to. The visualization server creates a "dot draw"
output format, which can be used to visualize the network.

Since 2014 BATMAN uses the userspace binary batadv-viz which uses alfred
to spread the information in a BATMAN network.

Alfred
* server/client system to spread information semi-centralized in the
BATMAN network.

Batadv-viz
* is an own binary
* reads the table from the local node
* hands it to alfred to communicate it to other nodes
* receives information form other nodes via alfred
* provides a JSON of the network to be visualized by server


The JSON produced by Batadv-viz looks the following:

Graphviz compatible output:

```
digraph {

        subgraph "cluster_fe:f0:00:00:04:01" {
                "fe:f0:00:00:04:01"
        }
        "fe:f0:00:00:04:01" -> "fe:f0:00:00:05:01" [label="1.000"]
        "fe:f0:00:00:04:01" -> "fe:f0:00:00:03:01" [label="1.004"]
        "fe:f0:00:00:04:01" -> "00:00:43:05:00:04" [label="TT"]
        "fe:f0:00:00:04:01" -> "fe:f1:00:00:04:01" [label="TT"]
        subgraph "cluster_fe:f0:00:00:02:01" {
                "fe:f0:00:00:02:01"
        }
        "fe:f0:00:00:02:01" -> "fe:f0:00:00:03:01" [label="1.000"]
        "fe:f0:00:00:02:01" -> "fe:f0:00:00:01:01" [label="1.008"]
        "fe:f0:00:00:02:01" -> "fe:f0:00:00:08:01" [label="1.000"]
        "fe:f0:00:00:02:01" -> "fe:f1:00:00:02:01" [label="TT"]
        "fe:f0:00:00:02:01" -> "00:00:43:05:00:02" [label="TT"]
        subgraph "cluster_fe:f0:00:00:08:01" {
                "fe:f0:00:00:08:01"
        }
[...]
}
```

JSON vis output:

```

{ "primary" : "fe:f0:00:00:04:01" }
            { "router" : "fe:f0:00:00:04:01", "neighbor" :
"fe:f0:00:00:05:01", "label" : "1.000" }
            { "router" : "fe:f0:00:00:04:01", "neighbor" :
"fe:f0:00:00:03:01", "label" : "1.008" }
            { "router" : "fe:f0:00:00:04:01", "gateway" :
"00:00:43:05:00:04", "label" : "TT" }
            { "router" : "fe:f0:00:00:04:01", "gateway" :
"fe:f1:00:00:04:01", "label" : "TT" }
            { "primary" : "fe:f0:00:00:02:01" }
            { "router" : "fe:f0:00:00:02:01", "neighbor" :
"fe:f0:00:00:03:01", "label" : "1.000" }
            { "router" : "fe:f0:00:00:02:01", "neighbor" :
"fe:f0:00:00:01:01", "label" : "1.016" }
            { "router" : "fe:f0:00:00:02:01", "neighbor" :
"fe:f0:00:00:08:01", "label" : "1.000" }
            { "router" : "fe:f0:00:00:02:01", "gateway" :
"fe:f1:00:00:02:01", "label" : "TT" }
            { "router" : "fe:f0:00:00:02:01", "gateway" :
"00:00:43:05:00:02", "label" : "TT" }
            { "primary" : "fe:f0:00:00:08:01" }
            [...]

```


Links:

* betadv-vis
  * https://www.open-mesh.org/projects/alfred/wiki/Batadv-vis
  *
https://git.open-mesh.org/alfred.git/blob_plain/refs/heads/master:/README.rst
  * https://downloads.open-mesh.org/batman/manpages/batadv-vis.html
* alfred
  * https://www.open-mesh.org/projects/alfred/wiki
* old & outdated BATMAN visualization server
  * https://github.com/open-mesh-mirror/vis-advanced


## Other Projects to Visualize the Network Topology

NetJSON

* http://netjson.org
* NetJSON is a network description JSON format from the openwisp project.
* NetJSON can be visualized via the django netjson-graph-visualization tool
  * https://github.com/openwisp/django-netjsongraph


# Proposition on How to Visualize the qaul.net Network Topology

We should create a qaul.net service that can share network-information
between the nodes.
For that each node can display the network topology if needed/wished for.

A resource friendly way to do this could be the following:

* create a visualization service in qaul.net
* only start the service when there is an active visualization request.
* a visualization request starts when the web visualization view is
loaded/displayed.
  * request now the node connectivity data from all other nodes.
  * send all the data to the web visualization in the JSON chunks of
each node as they arrive.
  * let the web visualization dynamically handle the visualization.
  * stop collecting when closing the view.
Export thread (mbox)