[RFC] Public Name System: Resolution and RDF


I also don’t think this necessarily needs to prevented, just trying to consider all the edge cases :slight_smile:

One interesting consequence of this is that if someone uses an existing XOR-URL as a Public Name, that Public Name will never be resolvable. I don’t know why anyone would want to do that though, and e.g. displaying an alert should be enough to dissuade them.


Yeh, i think that’s the main issue.

It might be worth noting that a client MUST show a warning or some such, so alternative clients should do that also. (Although, this RFC isn’t for management or creation of the _publicNames container… it does touch on it. I think we should probably RFC that out separately, and we can note any/all behaviours we want for that process).


This is so damn genius. Great work @joshuef


Haha, glad you enjoy @Nigel

But just to clarify: this is a the culmination of lot of work from across the @maidsafe team. This is just bringing it all together and writing it down at last (which there were also many hands in :P) :slight_smile:


Of course. I apologize because everyone who contributed deserves credit. @maidsafe amazes me on almost a daily basis. Really proud of you all.

Trying to straighten how WebID, XOR URL, PNS, all work together to achieve safe://AC/DC/DirtyDeedsDoneDirtCheap/RideOn

• WebID needs an associated PublicName in its RDF
• When that WebID saves a song, the app can name the subDomains appropriately in the correct order
• XOR URL is there but abstracted from the user because it was published under a PublicName? But also has its own cool features like under certain circumstances being able to be rendered in the browser.

Now my other question. If I have safe://AC/DC/DirtyDeedsDoneDirtCheap/RideOn
and there are not only multiple albums for an artist but also multiple songs per album (let’s stick with songs in an album for this) can I post multiple subDomains (songs) under safe://AC/DC/DirtyDeedsDoneDirtCheap? Which I believe DirtyDeedsDoneDirtCheap is actually already a subDomain.

Like this.
etc etc? @joshuef


There is not really a reason to restrict it that way in SAFE (at least as per these proposals), you should be able to have a WebID published at any type of URL, i.e. pubName-URL or XOR-URL, you could have safe://mywebid.nigel#me, or maybe at safe://hyfktced1wsgxzyxuiwrzrukgcagpxzowfy35zpo6hdd5jyhqxij84ri8uo#me. The WebID URL is just to resolve the location of where the WebID Profile document is stored and fetch it.

No, the XOR-URL is not stored as a pubName. The function we expose to resolve the pubName-URLs (webFetch) will also be able to resolve the XOR-URLs. This will be explained in the XOR-URL RFC (it’s also briefly mentioned in the other post where we are discussing about it).
When you invoke the resolver function, it’ll first try to decode it as a XOR-URL, if that step fails (either because it couldn’t decode the URL or because there was not data at the decoded XOR name), it will do a fallback to assume it’s a pubName-URL and try to find the pubName MD with the sha3 hash function, just like it works today for pubName-URLs.

I’ll leave Josh to answer the other questions :slight_smile:


Okay, I have a slight misunderstanding then. I had come to that assumption from your XOR URL demo vid but I’ll go back and watch it again to brush up. Trying to follow along the best that I can :grimacing: I’ll be back once I go over this a few more times.


No worries @Nigel, I like the ideas and the way you are thinking about all this, it’s the same type of things we were playing around with in our heads, please keep digging
You just need to think of the resolver to be simply a function which allows us to standardises both types of URLs, and by decoding the URL it can try to find it either by looking at a XORname that it found encoded in the URL, or otherwise by getting the sha3 hash on the URL and look up for a Resolvable Map MD at that location.

As an aside comment, with the ResolvableMaps and FileMaps we should be able to handle all type of combinations for WebID URLs, e.g.

  • safe://webid.mypub1#me
  • safe://mypub1#me
  • safe://webid.mypub1/folder1/card#me
  • safe://webid.mypub1/folder1/card#mewhendrunk
  • even safe://webid.mypub1 (we can support this thanks to the http://xmlns.com/foaf/0.1/primaryTopic of the WebID I believe, otherwise don’t know why it’s needed in a WebID)

…and the same combinations with XOR-URLs :wink:


Maybe the xor addressing could use safexor:// instead of safe:// to avoid such ambiguity?


Nice work @joshuef.

I tend not to partake in dirty jokes, but to parrot nigel and hunter


is a difficult acronym to deal with… Can I recommend “sns” for “Safe Name System” or “SAFE Name System”?

Other alternatives might be “sos” for “Safe Object System”, “sons” for “Safe Object Naming System”, or “ons” for “Object Name System”.


Now I see the dirty part. But you say ‘pee en es’, it is not like P(eter) Ness :smile:
Safe Naming System seems a good alternative to me. Open Naming System is also an option.


In the Rfc I see the two following things that are probably incorrect:

  1. I think the ‘:’ has to be followed with a link, or should it be replaced with a ‘.’?
  • Data is presented in a json, as RDF , as described over here:
  • I’m using MutableData ( MD ) and ImmutableData ( ID ) as shorthands.
  1. type: ’ @id entires…’, should probably be ’@id entries…’

And I’m not sure what the following means:

The RDF document should also contain a default graph ( : is intentionally chosen as it is not a valid subdomain portion of a URI), which points to the desired resolution if no key is provided. …

What is meant by the ‘:’-character? Should it be ‘:default’ instead of ‘default’ or something else?
And if this is the case, is ‘:default’ something completely intern to the Safe code? You can’t use it in a URI if I understand it correctly and in the RDF code I see ‘"default" : ...’ instead of ‘":default" : ...’.
I’m probably not familiar enough with all this.

And with FileMaps will (long term) the NFS containers still exist/keep using another kind of similar ‘scheme’?


Ah, nice suggestions @jlpell.

I’ll happily admit PNS is not the best acronym to be throwing around. We were trying to get something that was similar to DNS, but was not that to avoid confusion.

SNS has a good ring to it, and I can’t think of what it confuses.


Thanks for catching typos @draw.

Ah, this part is actually redundant now. Ups :expressionless: . @bochaco and I had a wee refactor early Thursday of the RFC and this was purged from the examples, but I missed it here. Sorry for the confusion there! Will update the RFC based on this/typos the now :+1:

edit: PR updated :+1:


There would be worse I’m sure. Public Mnemonic System would be worse for 1/2 the population. But considering this might end up the acronym “forever” it might be best to think of a better one now before this one becomes embedded in our minds arrrrgggggghhhh

How about PNSYS

Or Better Public Name Resolution PNR
Or Public Name Resolution System PNRS


You can. But just to clarify, a subName is similar to a subdomain, and so would be before the publicName.


It’s that form that you had originally. What I was wanting to suggest with the use of paths (in a File Map), was just that you could achieve a more readable URL with that setup. (I didn’t mean to imply that those paths were subNames.)

So you have both options available to you. Using subNames you can get the safe://someName.Before.ThePublicName setup. And pointing your ThePublicName, or indeed the subName it resolves to (here: someName) to a File Map, you can then use paths to expand the URL:


Does that make more sense? (I’m drinking my coffee now, but not sure if it’s kicked in yet :stuck_out_tongue: ) If not let’s keep it going as this is the kind of Qs we want to help make the RFC as clear as possible :+1:


Yes I think it does @joshuef thank you for the distinction between the two approaches!

There are a couple things I’m still unclear on as I try to wrap my head around this but I’ll keep mulling it over till I can ask a more coherent question. :yum:




Is somewhat what I had in mind when a user uploads their music (to give an example of a full path) but I am also assuming they won’t be able to use the jams subName or .demo service since that is owned by the app owner and we don’t plan on storing on behalf of the user so that they own/retain control of their data.

Am I wrong here? Is this possible?

Kind of curious if you could have paths with the same names just published under a different PublicName :thinking:

Still haven’t had time to dig in again just yet (with a much better understanding after your examples @joshuef ) but this popped in my head on my way over here. I appreciate any help, not trying to make you guys do all the heavy lifting but I’m sure others reading the thread could benefit too. :wink::wink: haha


Right. Any Public Name can point to any MD. Normally that would be controlled by the owner of this Public Name, this can point to Sub Domains and onwards. So it could depend on the app…

The app could simply use a Public Name owned by the user and map Sub Names etc,.

The app could include a user’s Resolvable Map as a target for a Sub Name in its own Public Name (though the user wouldn’t have control over if that stayed there, so I would consider that sub optimal.

(It could conceivably be both, but I still don’t know why we’d want the latter).

Thats’s entirely possible. What you’re saying with a Public Name is that it points to some data. This could be a Resolvable Map of Sub Names (or just a File Map), which can point to a File Map.

That File Map is a simulation of paths of a filesystem. And is completely independent of all other File Maps. So any number of users can have the same paths, pointing to different data (or indeed the same datas).


It is possible, but I’m not sure if you are describing the possible way or the not possible way. It depends who owns JamsUsersPublicName.

If the app owner owns that, they own the subNames too. But JamsUsersPublicName public name reads to me like the user owns it, in which case they own the subNames too.

The latter means that there is a copy of JAMS app at the user owned JamsUsersPublicName.

I’m not sure if that’s what you have in mind, but it is possible, easy to do, and won’t use many PUTs because they won’t need to pay to upload the JAMS source files, they will just reuse the XOR addresses of the source files.

This is how I envisaged users can own their own SAFE Plume blog, I just didn’t get around to implementing if fully yet. One day!

So to summarise, a user can effectively run a copy of JAMS on their own publicName, and would then own the jams and demo subNames on that publicName, and your app could set this up for them with a ‘create my JAMS’ command which registers their chosen publicName, and makes an instance of JAMS there.

That may not be what you have in mind. An alternative is for the app to be at one location owned by you as developer, but the user’s music stored and shared by the user at a location which they own. I’m not sure if this is what you have in mind, but it might be sensible, I’m not sure. I’d have to think more about that.