Repository navigation
Open
Description
I want to very severely change how AtomicServer uses URLS / IDs / Subjects. Right now, Resources are identified by HTTP strings. This has some issues:
- Setup is hard. We often need to set
ATOMIC_SERVER_URL. I really want to get rid of this as much as I can. I encountered this while I wanted to work on AtomicServer as homeassistant add-on #1138 - Moving domains is hard. When we change the domain, we break the IDs, even if we migrate the local data. See Dynamic server URL in subjects - make moving servers between domains easier #590
- Server dependence. Local-first data is cool, because things can work offline (Local-first resources - don't require a server when creating a resource #998). I want to move towards this paradigm. That means we need to have a different way of identifying resources. We'll probably need a
didscheme at some point. Maybe we'll usedid:ng, see Merging with NextGraph #1012. Maybe we can even make it work over a mesh Atomic over mesh #1137
When migrating to a different Subject type, I think we should also have these considerations in mind:
- We have to get rid of a lot of
Db:get_server_url, which we used to construct Subjects for endpoints. We should use - A single AtomicServer instance can have multiple subdomains (Wildcard subdomains #502), for different drives. The subject type should work with subdomains.
- I think it should probably be some new type of struct / enum. It should probably be domain agnostic, but it should be aware of a potential subdomain if added. Could internally use
Url - It should probably be able to handle multiple types of URL schemas, like
did:ngordid:ad. I don't know exactly how these should work. When resolving these resources, the logic will be different. - Maybe a URL type suffices. Maybe we transform request to the current instace to some
this-serverdomain or something. - Resources internally should not have the current domain hardcoded in their strings, including their references to other internal resources. These should maybe all use
this-serveras domain. - We'll need a migration script to update existing Subjects
- Existing HTTP URLs should continue to work, of course
- A single AtomicServer can be available on multiple URLS. For example, with multiple subdomains. Or on an IP. All of these should work. They should just emit other Subjects, depending on who requests it. So they are dynamic, need to be set when serializing the data. This has impact on Commits! I think this is where we really need the new "first commit signature" identifier that I describe in In search of the perfect identifier: about subjects, URLs, CIDs and more #1114
Related to:
Metadata
Metadata
Assignees
Labels
No labels
Activity
joepio commentedon Feb 6, 2026
Currently working on an approach where we have a new
Subjectenum (eitherexternal,internal, ordid). Also trying to get rid of all theserver_urlcalls and ENV, since servers can have multiple, and we want this to be request / origin dependent.Biggest thing that I kind of forgot about, was that this also means that
subjectin Commits can move. And that's a problem, because Commits are immutable. The solution here, IMO, is to usedid:adwhere we don't use the domain of the server but we use the signature. I think we should include at least a hint of where the server (or servers!) is available, though. Maybe an array of hosts as a property in the Resource? Maybe also later add apretty-urlorslugthat has a space within that host!Refactor Subject Rust #1139
dids #1139
joepio commentedon Feb 6, 2026
I'm thinking about
did:adresources and hierarchies. Sincedid:adthings can be created basically anywhere, we may have to consider how they work in a hierarchy. If it's an HTTP parent, how do we deal with rights? Typically, we fetch the parent and check their rights. But what if that parent is offline? We don't want to prevent the user from making commits of course. We could allow that to happen regardless, a server can still reject commits if they don't comply. But that could lead to inconsistencies. We could also let a creator of a resource always edit it. Or maybe explicitly add awriteattribute with the creator.joepio commentedon Feb 6, 2026
We're getting closer to being compatible with
did, but we're gonna encounter a problem.The W3C
didspec requires the did resource to resolve to aJSON-LDfile with an@context, anidand averificationMethod. The rest is optional. Would require a custom serializer though, because JSON-LD properties are typically not valid atomic data (although the inverse IS true!)Agents as did #1139
Refactor Subject Rust #1139
dids #1139
Agents as did #1139
DID refactor #1139
joepio commentedon Mar 24, 2026
I'm currently adding
did:ad:{genesis}anddid:ad:{agentPubKey)anddid:ad:{commit}resource types.I'm pondering to allow
did:ad:{genesis}/path. For now, it's not permitted, but perhaps it makes sense if we constrain it enough. Some thoughts:joepio commentedon Mar 26, 2026
@Polleps mentioned an aspect of ULIDS that I haven't considered: the option to sort by date. It's kinda neat if we can do this. We could prepend the signature with a few bytes to include the genesis timestamp.
joepio commentedon Apr 9, 2026
I think we should use base62 instead of base64, get rid of the
+and/characters. The/especially is problematic when parsing it as URL.Refactor Subject Rust #1139
dids #1139
Agents as did #1139
DID refactor #1139
Fix catastrophic data loss in the sled→redb migration
joepio commentedon Sep 12, 2026
Backlog consolidation requested by the maintainer. Consolidated identifier-design backlog: retain legacy HTTP identity/domain migration and redirects (#590, #749), non-path client-created IDs (#593), and identifier/authorship/resolution tradeoffs (#1114). Subject/DID infrastructure now exists, but these closures do not assert that every legacy migration or resolution edge case is solved. Keep remaining concrete work in this tracker and #1210 for human-readable routing.