bmx-routing / bmx7

BMX7 / SEMTOR Securely Entrusted Mesh Routing Protocol
GNU General Public License v2.0
63 stars 15 forks source link

NetJson support for BMX7 #5

Closed aparcar closed 5 years ago

aparcar commented 6 years ago

The current bmx7 implementation supports various outputs in JSON format. To be easily adaptable by other motoring solutions it would be nice to use NetJson instead.

aparcar commented 6 years ago

@axn

aparcar commented 6 years ago

This can be archived with small modifications of the topology plugin

axn commented 6 years ago

Pushed some initial code via b2d50d1ad6452c42669666ab72e36e4b2269021a. Plugins bmx7_json.so is and bmx7_topology.so are needed to get the file /var/run/bmx7/json/netjson/network-graph.json which can be processed for example with https://github.com/netjson/netjsongraph.js#netjsongraphjs

Links are only shown for nodes which publish their link status via descriptions. Therefore other nodes also need to have the bmx7_topology.so plugin loaded. image

aparcar commented 6 years ago

I'd suggest to set NetJson label to bmx7 hostname and NJ id to bmx7 shortId

Also could you elaborate on the "metric"? wTxRateEff looks good to me.

aparcar commented 6 years ago

First tests work, great!

aparcar commented 6 years ago

Currently I see two shortcomings of using the topology plugin:

Instead of using the topology plugin it would be interesting to use the json plugin. The format is should be pretty easy to implement:

./status

{
            "id": "0A389479",
            "label": "rdntz-ostpassagetheater",
            "properties": {
                "node_state": "up",
                "traffic_mesh": "994029988",
                "uptime": "328469",
                "load": "0",
                "memory": "53.58021408151053"
            }
},

./links

{
            "source": "86C6E07B",
            "target": "F28A9409",
            "properties": {
                "devs": {
                    "br-lan": "1000000000"
                },
                "rate": 1000000000,
                "best_rate": "over1Gbit"
            }
},

An option in the config could make the sms plugin output (additionally) the other format. This is especially interesting for a decentralized monitoring approach as introduced in the paper Enhancing reflection and self-determination in a real-life community mesh network

axn commented 6 years ago
  1. Why should cpu and mem overhesd for non-interested nodes be differen when served over json plugin.
  2. your general suggested format is similar to the current topology plugin format. I could add properties.

Am 5. Mai 2018 15:08:59 MESZ schrieb Paul Spooren notifications@github.com:

Currently I see two shortcomings of using the topology plugin:

  • The data is infrequently updated on nodes
  • It's stored on all nodes and so uses cpu/mem even on nodes which don't use the service at all.

Instead of using the topology plugin it would be interesting to use the json plugin. The format is should be pretty easy to implement:

./status

{
           "id": "0A389479",
           "label": "rdntz-ostpassagetheater",
           "properties": {
               "node_state": "up",
               "traffic_mesh": "994029988",
               "uptime": "328469",
               "load": "0",
               "memory": "53.58021408151053"
           }
},

./links

{
           "source": "86C6E07B",
           "target": "F28A9409",
           "properties": {
               "devs": {
                   "br-lan": "1000000000"
               },
               "rate": 1000000000,
               "best_rate": "over1Gbit"
           }
},

An option in the config could make the sms plugin output (additionally) the other format. This is especially interesting for a decentralized monitoring approach as introduced in the paper Enhancing reflection and self-determination in a real-life community mesh network

-- You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/bmx-routing/bmx7/issues/5#issuecomment-386804584

-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

p4u commented 5 years ago

I am trying to use netjson to visualize the network but the links aray is empty. The rest works out of the box.

p4u commented 5 years ago

bmx7-topology was missing in some nodes, after enabling it and wait some minutes, the graph worked.

p4u commented 5 years ago

Added topology graph to luci-app-bmx7

https://github.com/openwrt-routing/packages/tree/p4u/luci-app-bmx7/refactory

markbirss commented 5 years ago

Added topology graph to luci-app-bmx7

https://github.com/openwrt-routing/packages/tree/p4u/luci-app-bmx7/refactory

@p4u can you help to find where to increase the size of the view of the bmx7 nodes ?