I was humming and hawing about replying over there, but this is (intended) to be a more general post on info about RDF implementation on SAFE (as opposed to SOLID). Focussing more on what’s out there and how we might best implement something RDF-y, that could then be used by other stacks (like SOLID) (in a similar way to the SAFE Plume implementation).
As for me, the RDF/turtle setup in Plume could be SAFEr. (using MDs for example, as opposed to
ttl files and NFS emulation.). But I’ve been struggling to figure our how/why you get RDF schemas, how you could easily reference them and how to do that in SAFE.
And soo, I’ve been reading deeper into things like IPLD and RDF/Turtle and now JSON-LD.
What follows is some learnings from my readings and some light opining.
@bochaco @Krishna @frabrunelle @happybeing FYIs. Feel free to correct me if I’m misunderstanding something here! And please opine! Just wanted to create a summary of some more useful content i’ve been reading.
IPLD is away of ensuring references to specific ‘hash’ based content can be universally understood. (ipfs content, bitcoin blocks, git commits… anything).
We could have some parser to establish a way of linking to specific SAFE content (MD/ID, by xor address hash), as a way of referencing SAFE data on other platforms.
multiformats/hash/base/codec etc are cool. It’s a simple solution to avoiding problems in future that we should look into using throughout SAFE to future proof encodings/hashing etc @nbaksalyar @ustulation, not sure if you’s have looked there/have thoughts? (is multihash something we could be for the xor addresses, for eg?).
It doesn’t (as I understand), offer much that we can add to SAFE (beyond using it to reference specific data, off of SAFE) once we have a URI structure in place for easily identifying content on the network (as we’ve been talking about). That would form part of the IPLD/SAFE implementation to make the data reference-able outwith of the network.
This talk was really informative for IPLD: https://www.youtube.com/watch?v=Bqs_LzBjQyk and I’d recommend giving it a watch for a decent overview.
RDF (Resource Description Framework).
This is the main way of ensuring that data you write can be interpreted easily across programs. And is one of the founding priciples of SOLID
Coupled with OWL, or something similar it enables you to describe your data with the aim of making it portable.
"http://thing.com" is a link.
There are many ways to do this. And it’s a bit/lot overwhelming.
this is one option. And seems to be one of the more established ways of representing the data. however it’s not the most human readable thing, and it requires specific parsing for use in web browsers, and to save to the network (or simply using NFS and storing the turtle files).
After digging in here, it was not clear to me even where to begin with proposing a data type for something on SAFE (or how to find something already existing, which we could reuse). Which, if we’re wanting to get devs going with some sort of RDF for data stored on SAFE, we’re going to need to make as easy as possible.*
[ * we as in community, not necessarily maidsafe.]
JSON-LD is another way of representing RDF schemas/content. But it seems like quite a clear one to me (and is fully compatible with the RDF standard).
An enlightening read on why it exists (in a world with RDF)
and the basics are here:
Being a JSON object, JSON-LD lends itself to a key:value storage system like mutable data, quite nicely.
To me it seems muuuuch simpler/clearer, AND it has some clearly defined resource descriptions (such as
person: https://json-ld.org/contexts/person.jsonld ) ready for reuse. AAAand a handy-dandy tool for exploring the schemas https://json-ld.org/playground/
More reading: https://json-ld.org/learn.html
I think, as a representation of RDF schemas, JSON-LD is leading the pack for me in terms of clarity / usability with the network.
We should probably look (if it’s desirable for the community), at hosting the schemas on the network once we have addressable content. To aid development (and prevent those nasty HTTP requests).
I’m not sure how to make things easier for devs though. How we encourage using such structures…? It seems to me something we want to incentivize in some form (maybe just by making it easy). I’ve no idea how though atm…
I think we should start spitballing around things that could be useful on SAFE. (Nothing gets the ball rolling like getting the ball rolling):
So I’m going to have a look at a User profile (as some sort of
person extension). And what that might look like on SAFE (given that maybe you want to store your full profile, but not let everyone/app see your some parts of that (age or nationality, for example…).
Anyway. I mostly wanted to share some learnings and links. As I feel like I have somewhere to start now!