Git Product home page Git Product logo

netjson's Introduction

netjson's People

Contributors

aaronkaplan avatar brainbuzzer avatar dirkfeytons avatar gabri94 avatar jonathancross avatar mwarning avatar nemesifier avatar nepython avatar sommer-gei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netjson's Issues

[website] Statically generated content pages

Some link present on the website would do better on a dedicated content page rather than a section in the github README.

In particular I'm referring to:

  • motivations and goals
  • implementations
  • how to send feedback
  • how to register extensions
  • FAQs

Multiple Graphs/Routes

See this mail and the related follow-up: https://lists.funkfeuer.at/pipermail/interop-dev/2015-May/000405.html

Hi,

I have just started on this and noticed a small problem...

olsrd2 is "multitopology capable", which means it can run multiple
topologies at the same time.

How do we resolve this for the "routes" and "graph" output? Do we need
to add another layer which allows multiple metrics, each with
graph/routes?

Henning

See also: https://lists.funkfeuer.at/pipermail/interop-dev/2015-May/000406.html

Okay,

first implementation is finished (is available as the
"json_for_networks" plugin in the OONF repository), but I think we
need a few changes in our JSON definition.

I have attached both "routes" and "graph" output of my plugin, that
should make it easier to explain the changes.

The major change is a new level of indirection, both for routes and
graph objects to allow multiple topologies for both of them. This is
relevant for dualstack support, because olsrv2 has a different
"originator ID" for IPv4 and IPv6. It would also become very useful
for running multiple routing metrics at the same time.

Attachements:

[Schema] Improve array definitions

Things like:

"load": {
                "type": "array",
                "items": [
                    {
                        "type": "number"
                    },
                    {
                        "type": "number"
                    },
                    {
                        "type": "number"
                    }
                ]
            },

Are wrong. Better use attributes like minItems and maxItems.

NetJSON RFC JSON types

Not sure if this is the best place to comment on the RFC, but I see that for key names there are only primitive JSON types specified. Wouldn't it be better if a JSON schema type with JSON schema formatter definition would also be specified?

And along the lines of #45, it would be great if a semantic URI of the key definition would be specified/defined. It would be great to have semantic schema definitions for network objects in the standard.

Device attribute in NetworkRoutes ambiguous

sent by Thijs van Veen

In the Route object, you suggest a Device field to reference the
actual interface you're targeting.
I suggest changing the name Device to Destination Interface or something
similar to differentiate in terminology between devices (nodes) and
their interfaces.

We forgot to address this.

Device Config: physical_devices doubt: phy0 vs radio0

Is there difference between phy0 and radio0?

In the nodewatcher-agent example posted in #1 both are mentioned but only radio0 has a definition.

Via openwrt ubus I see no mention of any phy object, but I see mention of radio0 (via ubus call network.wireless status, just it doesnt have the information contained in our physical_devices section, but something slightly different.

Via the iw command I see that interfaces reference a phy object, and iw phy returns all the capabilities of the physical device.

I am a bit confused. Can anyone bring some clarity?

Clarify what an ID is

  • make clear what an ID is (eg: can it be also a non-address, like a hash?)
  • you use the concept of ID also for routes but you expect addresses, please clarify
  • which attributes do refer to IDs in NetworkGraph and NetworkRoutes

NetworkGraph: human readable weight

Different protocols can use different metrics which might be converted to a different textual representation.

How to deal with this problem?

  • an additional attribute with a textual representation for each link
  • one attribute for the entire NetworkGraph object

A third option would be:

  • delegate the interpretation to the consumer application and discuss this issue again when we have more implementations.

JSON-LD schema

While JSON schema is useful to validate if the JSON is of valid structure and types, JSON-LD allows one to assign semantic values to the JSON properties. This allows then even greater interoperability. I started looking into this for nodewatcher and the idea is that if we describe nodewatcher API with JSON-LD, and netjson with JSON-LD, then we get automatically convert between each other. So then our API REST endpoint can offer multiple formats, JSON (plain nodewatcher structure), JSON-LD (JSON with added JSON-LD @context attributes) and netjson (JSON-LD converted to netjson using netjson JSON-LD specification).

So, at least theoretically, this would allow us to define schemas for our APIs only once and then interchange them even if they are internally stored differently.

Because netjson is very similar to our nodewatcher API I think this could be a good proof of concept if we can get it to work.

So what we will have to do is annotate each property of netjson with its definition URI (often URI which points to https://schema.org/, or some other common schema from http://vocab.cc, http://lov.okfn.org/dataset/lov). Probably we would have to define some our own, which is also good and could be hosted at the netjson domain.

See a similar attempt at GeoJSON: https://github.com/geojson/geojson-ld
And their definition of properties: http://geojson.org/vocab
And JSON-LD context: http://geojson.org/contexts/geojson-base.jsonld

We could then create:

  • http://netjson.org/vocab for netjson specific property definitions (like routing metrics and stuff, which probably does not exist elsewhere), those same would then be used by nodewatcher JSON-LD context
  • http://netjson.org/contexts/v1.0/base.jsonld

So even if maybe our APIs have fields in different places inside JSON, they do share meaning of fields. (Moreover, it would be interesting to see for which fields we understand different meaning.)

cc @kostko

nodewatcher agent example

@kostko, can you show a full example of how nodewatcher agent outputs device (router) description? I talked with @nemesisdesign about trying to create a common schema for that.

Device Config: should we have a "routes" section too for static routes?

Should we model the static routes of a device (what's in ip route or route -n)?

Ubus does this but inserts the routes in each interface (same for dns-servers and dns-search).

Since we have one dns_servers block and one dns_search block, it would make sense to make a single routes section for consistency, unless we think it's more practical to have this information stored at interface level like ubus does.

Since Henning Rogge (core OLSR developer) confirmed that we can reuse the structure in https://github.com/interop-dev/json-for-networks/blob/master/examples/network-routes.json also for static routes (https://lists.funkfeuer.at///pipermail/interop-dev/2014-November/000308.html) we could add something like this to DeviceConfiguration:

"routes": [
        {
            "destination": "ID",
            "source": "ID",
            "next" : "ID",
            "device": "DEVICE",
            "cost": 1
        }
]

Add a source interface field in NetworkRoutes

sent by Thijs van Veen

You suggest a Source field for source-specific routing.
I suggest adding a Source Interface field, this way (it seems to me) you
can more easily handle multi-interface devices.

In my experiences, multi-interface devices have always caused issues
when trying to describe them and it would be great to take care of that
issue in what is supposed to become a standard.

We forgot to address this

NetworkGraph: infinite weight

How to deal with infinity?

Perhaps the best thing would be to forbid links with infinite weight because they are not usable so it's like not having them.

[radio] Add protocol

We need a protocol attribute that can be either 802.11n, 802.11ac, 802.11a, 802.11b, 802.11g, ecc.

Shall we add a "Goals" statement below each definition?

I believe adding a "Goals" statement under each definition (eg: NetworkGraph, DeviceConfiguration), will help us to focus our scope.

If we don't achieve some focus, we could keep spinning in a wheel trying to add more and more details, so the question, rather than "should we add x"? in my opinion should be does adding x help us to reach our goal?.

[NetworkGraph] Amibiguity on graph scope

The RFC is not clear on whether NetworkGraph should contain the full network or just what is known to a node.

@fhuberts was deceived by this ambiguity with the first version of the olsrd1 netjson plugin.

I think it would be acceptable to mandate that every implementation returns all the information it has about the network graph. This should be ok for distance vector too.

Another proposal related to this one is #25 (how to distinguish between full graph and partial/local graph?).

CC: @HRogge @gabri94

[DeviceConfiguration] enabled vs disabled

Currently we have one attribute called enabled, while we have a few other ones called disabled.

It would probably be better to be consistent and chose one of the two.

I would prefer that if a block if present is enabled by default but can be disabled by adding { "disabled": true } if needed. It's easy to read and handy because it allows to temporarily disable a config block without removing it.

Neighbour link data in NetworkGraph vs new object based on NetworkGraph

It was mentioned in several discussions on the mailing list that we need an object to represent neighbour link data.

This was also referred to as "link-specific" or "interface-specific".

the 1st proposed solution is to add a new top-level member in NetworkGraph would be sufficient, we have to find a good name for this member and add it to the spec.

the other (2nd) possible solution is changing the value of the type attribute but keeping the exact same structure of NetworkGraph. This could be an acceptable solution IMHO: we keep the compatibility with NetworkGraph, we avoid adding too many attributes but at the same time we also make a clear distinction between the use case of the two objects.

In my opinion, the first thing we should try to do is to have a discussion about the terminology used by different routing protocols to refer to this type of data.

The second thing we have to do is to clearly state the goal / use case for this object, what do we need to do with it? Why did we add it?

[DeviceConfiguration] logical interface names

Some OpenWRT developers suggested to add a distinction between physical interface names and logical names. This because physical names can be automatically generated and vary a lot from manufacturer to manufacturer.

I think the current name attribute of interface objects could refer to logical names while an optional device attribute may refer to the physical name of the interface.

[DeviceConfiguration] General "country" option

It makes sense to define "country" in the general section, since it doesn't make much sense to define different radios with different country settings.

Therefore I think a similar configuration:

{
    "type": "DeviceConfiguration",
    "general": {
        "country": "EN"
    },
    "radios": [
        {
            "name": "radio0",
            "phy": "phy0",
            "protocol": "802.11n",
            "channel": 140,
            "channel_width": 20
        },
        {
            "name": "radio1",
            "phy": "phy1",
            "protocol": "802.11n",
            "channel": 132,
            "channel_width": 40
        }
    ]
}

it's better than:

{
    "type": "DeviceConfiguration",
    "radios": [
        {
            "name": "radio0",
            "phy": "phy0",
            "protocol": "802.11n",
            "channel": 140,
            "channel_width": 20,
            "country": "EN"
        },
        {
            "name": "radio1",
            "phy": "phy1",
            "protocol": "802.11n",
            "channel": 132,
            "channel_width": 40,
            "country": "EN"
        }
    ]
}

Because the latter repeats the "country" option for each radio.

PS: this is somewhat similar to #41, in which an interface related setting is included in the "general" section because it affects several parts of the configuration and not a specific one.

Standardize node alias list

A lot of routing protocols can have multiple IDs (aliases) for the same node.
In OLSR this is called MID, in batman-adv primary and secondary id.
We should find a standard way to rapresent it in the various json.

I propose to add this optional attribute inside of the elements of the list "nodes":

"aliases": [
    "172.16.40.25",
    "172.16.40.26"
]

so "nodes" would become something like:

"nodes": [
    {
        "id": "172.16.40.24",
        "aliases": [
            "172.16.40.25",
            "172.16.40.26"
        ],
        "label": "node-A",
        "properties": {
            "hostname": "node1.my.net"
        }
    }
]

See ML thread: https://lists.funkfeuer.at/pipermail/interop-dev/2015-June/000421.html

[DeviceConfiguration] mesh_id

Open802.11s introduces the mesh_id concept.

This adds a bit of complexity to the validation of wireless interfaces because SSID should not be required if 802.11s is selected, while mesh_id should be required.

networkgraph: Double array in nodes

I don't understand why you open two times an array of links.

 "links": [
    [
        {
            "source": "172.16.40.24",
            "target": "172.16.40.60",
            "weight": 1.000,
            "properties": {
                "lq": 1.000,
                "nlq": 0.497
            }
        }
    ]
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.