fedwiki / wiki-plugin-data

Federated Wiki - Data Plugin
Other
1 stars 2 forks source link

Graph model not explicitly mentioned in README #3

Open almereyda opened 9 years ago

almereyda commented 9 years ago

The README states we can also fearlessly drop a JSON representation of a graph.

data.coffee#L58 makes some assumptions about how such a graph should be modeled.

By looking into some almereyda/graph_json_examples I've found that wiki goes different directions here:

Would it make sense here to upgrade the graph support of this component to JSON-LD, to follow a spec, and start implementing stronger Semantics?

WardCunningham commented 9 years ago

http://www.w3.org/TR/json-ld/

I didn't see anything in the spec that would make JSON-LD incompatible with this plugin.

If you're suggesting that all data ever held in this plugin should be JSON-LD compliant then this is more work than I'm up for at the moment.

I am interested in seeing link-level data served from federated wiki sites much like we now serve sitemaps. This raises questions as to how deeply into plugins this aggregation should go. I write plugins that dynamically generate links for short periods of time. I'm guessing trying to aggregate and publish these links could be going too far.

almereyda commented 9 years ago

If you're suggesting that all data ever held in this plugin should be JSON-LD compliant then this is more work than I'm up for at the moment.

No, sorry for the misunderstanding. This issues body content turned out to have a broader range than intended.


I'm asking for adding a note to this' README or the about-data-plugin page about how a dropped JSON graph should be modeled in terms of the structure assumed by https://github.com/fedwiki/wiki-plugin-data/blob/master/client/data.coffee#L58

{
  "nodes": [
    1,
    2,
    3
  ],
  "links": [
    {
      "source": 1,
      "target": 3
    },
    {
      "source": 2,
      "target": 3
    }
  ]
}

The comparison was just a foundation for reasoning about how things should be named and specified. Then I just came across the incongruence between linkmap's and data's approaches towards graph modeling (in JSON). I've offered JSON-LD only as a least common multiple for streamlining graphs in wiki.