[Interop-dev] Network Device JSON Schema
Nicolás Echániz
(spam-protected)
Mon Nov 3 08:56:33 CET 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/01/2014 12:41 PM, Nemesis wrote:
> You can immagine it like GeoJSON which is widely used in GIS apps
> and GIS libraries. You can pass a GeoJSON to most GIS low level
> libraries and it will be converted to a geographic object of that
> specific library, that approach has been very successfull.
>
> It would be really cool if we could define a schema for network
> "stuff" that we could pass to libraries and apps like it already
> happens with GeoJSON. Sure we should split the NetJSON in more
> components, and we can surely work on it in parallel.
>
> So my next questions are
>
> * is it clearer now? If not I might spend some more time trying to
> explain myself clearer
I believe it's clear enough already.
> * do you think it's worth it? if not could you explain what
> alternative you would prefer?
I agree this is an interesting undertaking for the community mapping
and monitoring teams out there (us + others).
> * do you have time to start collaborating on defining the
> components you are most interested in?
I have little time because I've recently had a daughter and she is the
new owner of my time :) but I can contribute.
> * which are the components you are most interested in right now?
the most basic stuff, so we can make progress from that.
It might be useful to share the internal discussions and solutions on
our teams...
When discussing LibreMap with André (is he a member of this group?) we
tried to define the most basic schema for node mapping and make any
other information optional (through plugins that populate the JSON).
We were focused on map representation, so our basic model was just:
{
"hostname": "awesome-router",
"lat": -31.805412,
"lon": -64.424677,
"elev": 50,
}
This would serve the purpose of representing a device on a map.
We added some basic "community" information attributes (mostly needed
for grouping/filtering data):
"site": "roof town hall",
"community": "Freifunk/Berlin"
The "site" attribute here represents what is commonly named: node.
Many devices sharing a "site" would be considered as a node.
Other data that's useful for the mapping system:
"api_rev": "1.0",
"type": "router",
"ctime": "2013-05-11T13:05:22.000Z",
"mtime": "2013-09-12T11:14:12.000Z",
We then added an aliases attribute that is used to calculate link ends
on different link types (OLSR, WiFi, BATMAN, etc.)
"aliases": [
{
"type": "olsr",
"alias": "104.201.0.29"
},
{
"type": "batman-adv",
"alias": "21:13:f1:a5:a2:20"
}
],
Link data can then be reported using these aliases:
"links": [
{
"type": "olsr",
"alias_local": "104.201.0.29",
"alias_remote": "104.201.0.64",
"quality": 0.78,
"attributes": {
"etx": 2.094,
"lq": 0.588,
"nlq": 0.812
}
},
{
"type": "batman-adv",
"alias_local":"21:13:f1:a5:a2:20",
"alias_remote": "52:23:61:a7:a1:56",
"quality": 0.78
}
],
And then every other information about a node is expected to be
included in a "wildcard" attribute:
"attributes": {
"firmware": {
"name": "meshkit",
"rev": "47d69e2001a789a104117af266332c73919b4326",
"url": "http://meshkit.freifunk.net/"
}
}
The structure we currently use is documented in the LibreMap repo:
https://github.com/libremap/libremap-api/blob/master/doc-api-router.md
I'd say that what communities want to represent on a map is device
location and basic status (online, offline, projected, etc) + social
information (community, people in charge, etc.). All maps I've seen
also try to represent links, either dynamically or manually updated.
Most other monitoring information is usually represented on other
systems, not maps, although I'd very much like to see map
representations of traffic and other data, maybe through heat map layers.
So... I'd ask. Do we first want to define a JSON schema for network
information we want to represent on a map? Or are we planning to
define a schema for all information regarding our network devices? I
know some implementations use a map as "navigation" to let the user
access further information on network devices, but I think it's
interesting to first focus on information relevant to showing a
network map.
Cheers,
Nico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQEcBAEBAgAGBQJUVzUrAAoJEPHORz17N0TFUkgH/RlSBXRa0B22fFUp+TFS6iUf
Z9RpYIWWLi9IvoNQ0s5+wC0DT49caOpcyfLwS3v9Jt4uZVuC6dSzzI4rjctxuJ/F
hgEYuMZXcHcTYzgCjv1GJ0YlH9QxzExZRKHjV7aC9qRm3jyZ/aBzJpUS67N8BxJk
pyF3iovsXHtNG75UApVB8pECQOv/CHo9ZZRKNHPqFx5eU7pe8efcIUL6RRo0gNe7
3y7xGnesgHrUD4Zret/WUh0HzZl6a59F6ShjP4BKjs2+7aZhsQtJl/ljRmMO0Iib
XYD01a57U8jQKtQHRMPfelohZl7qUb6Uol2RExK4CvjUHM+kOkYuaCwgJMm+t5A=
=PICc
-----END PGP SIGNATURE-----
More information about the Interop-dev
mailing list