-
Notifications
You must be signed in to change notification settings - Fork 70
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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels