Developing lightweight computation at the DSG edge

Commit 93b3d2f4 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[fetch] Update Readme

Signed-off-by: default avatarRoger Pueyo Centelles <>
parent 34d202c1
A repository for testing code for the monitor use case
# uc-monitor-go-test
A proof-of-concept application that leverages [AntidoteDB]( to orchestrate the network nodes monitoring system for the [LightKone]( project.
## Description
The monitoring application is distributed in three main blocks:
- Network description fetching and feeding (functional)
- Nodes assignment among the different monitoring servers [WiP]
- Actual nodes monitorisation [WiP]
External libraries are used. If not previously installed, run in terminal:
This proof of concept is built on top of the [AntidoteDB Java tutorial]( by [Deepthi Akkoorath (@deepthidevaki)]( and uses [João Neto (@joaomlneto)]('s [HTTP/HTTPS REST API for AntidoteDB](
go get
go get
## Installation
### Docker
Install `docker-ce` using your
1) go run monitor-fetch.go
### Go and required libraries
Install Go using your operating system's package manager or follow the [instructions here](
Result example:
56351 nodes read from cnml.xml
52553 devices read from cnml.xml
39582 devices exported to /tmp/gmonitor2/devs.json
After installing Go, download and install the folowing external libraries needed:
- golang/glog:
2) go run monitor-assign.go
`go get`
3) For go run monitor-ping.go
- sparrc/go-ping:
e.g. go run monitor-ping.go <host>
`go get`
previously as to this note on Linux Support:
This library attempts to send an "unprivileged" ping via UDP.
On linux, this must be enabled by setting
sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"
### AntidoteDB Java tutorial
Get the tutorial's source code [here]( to download the code and [start the two AntidoteDB nodes](
Install the AntidoteDB REST API server following the [instructions here]( Once everything is installed, start the server with the `antidote-rest-server` command. The server connects to one of the AntidoteDB instances (the one running on port 8087) from the Java tutorial.
## Building and running the application
### Fetch the network description and feed it to AntidoteDB
The whole network description is included in the `cnml.xml` file, which can be downloaded from the website, and is used by default:
$ cd src/monitor/fetch/
$ go run monitor-fetch.go
57642 nodes read from cnml.xml
53461 devices read from cnml.xml
39988 devices exported to /tmp/gmonitor2/devs.json
0 devices removed from AntidoteDB (0 success, 0 fail)
0 IPv4 addresses removed from AntidoteDB (0 success, 0 fail)
10634 devices added to AntidoteDB (10634 success, 0 fail) ...
Smaller subnetworks can be used instead, like the Guifi-UPC subnetwork, for testing purposes:
$ go run monitor-fetch.go -cnml_file upc.xml
19 nodes read from upc.xml
0 devices removed from AntidoteDB (0 success, 0 fail)
0 IPv4 addresses removed from AntidoteDB (0 success, 0 fail)
49 devices added to AntidoteDB (49 success, 0 fail)
67 IPv4 addresses added or updated to AntidoteDB (67 success, 0 fail)
### Assign network nodes to monitoring servers [WiP]
go run monitor-assign.go
### Monitor the nodes [WiP]
go run monitor-ping.go <host>
### Note
Previously as of this note on Linux support: _this library attempts to send an "unprivileged" ping via UDP. On Linux, this must be enabled by setting_:
```sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment