Combined URI Syntax Proposal (at:public and at:space)

I agree that at:public contrasts weirdly with at:space, because spaces can be public. I originally had at:repo even though space repos are also a thing. I think “firehose” is a mechanism, not a namespace or semantic. I like at:global quite a bit!

Conceptually I think of URIs as being about namespaces, and the new top thing here (space vs global) is discriminating the type of namespace. Space records have a funky dual namespace: a global space reference, and then a space repo record reference.

3 Likes

I’m open to that. I think we should forbid handles in space URIs as a start.

4 Likes

bikeshedding: loving at:global, much much clearer than at:public

6 Likes

There are lots of other good reasons to resolve NSIDs, and since there won’t be very many of them (compared to DIDs), they’ll be easy to cache. With that, resolution cost should not be an issue. We’re caching DIDs, too, right?

(If the NSID uniquely determines whether something is a collection or a space, it is effectively the namespace identifier)

at:// does not conform to the URI specification (though if you mean at://space or at://public, in my opinion, the space part looks too removed from at:), and at:/ looks too similar to the legacy at:// syntax.

1 Like

why not retain at:// with something like:

at://repo/<did>/<collection>/<rkey>
at://space/<space-account>/<space-type>/<skey>/<repo-account>/<collection>/<rkey>

moving the DID into the path addresses the colon related parsing issue in both RFC 3986 and WHATWG.

4 Likes

Interesting. Still digesting the proposed syntax…but if this were the direction at:global is more useful that at:public and doesn’t necessarily convey that the resource is public which is a strength for patterns outside of at:space. In this light, I think there may be room for discussion about an at:local namespace for local-first content?

1 Like

Hmm…This actually makes logical sense. What about the authority being the service resource name in the DID document so it’s discoverable versus hardcoded?

at://atproto_pds/<did>/<collection>/<rkey>
at://atproto_space/<space-account>/<space-type>/<skey>/<repo-account>/<collection>/<rkey>

Likewise custom repo’s could then introduce their namespaces (making these up):

at://streamplace/<did>/...
at://tangled/<did>/...
at://local/<did>/...

2 Likes

oh yeah I mean at://public or at://space here, sorry for confusion!

Hmm… yeah I think I would prefer this one :thinking:

1 Like

I like at:space and at:global as well!

If we must keep the tagging, I think it would be nice if the tags were the same part of speech and understandable to the general public. “space” is a noun where “public” and “global” are adjectives. “repo” is a noun, so it’s a better match for “space”, but it is incomprehensible to the general public (and isn’t there such a thing as “space repos”?). “user” might not be perfect, but if we used that instead of “repo”, I think most people would get that it’s controlled by an individual. Alternately, we could go with adjectives and drop space and instead use “public” and “permissioned”.

If we had to change, I dislike this one the least.

I mean I’ve been a fan of the at:// form because you can actually feed that to (most) URI parsers and it’ll “just work” - unless I’m using some hilariously relaxed parsers of course…

Why not at+space:// and at+repo:// - seems to be a bit more in line with how things like that end up going (e.g. git+ssh://)

I think that puts a namespace disambiguation (“this URI has the space namespace structure, not the global namespace structure”) in the special “authority” section.

Which is both in tension with the IETF URI semantics, but also pretty aesthetically and pragmatically confusing.

It does not work in most of the URI/URL parsers I have tried: web platform URL.parse(), the python standard library, the Go standard library, etc.