Skip to content

Refactor Subject (resource identifiers / urls / dids / ids) #1139

@joepio

Description

@joepio

I want to very severely change how AtomicServer uses URLS / IDs / Subjects. Right now, Resources are identified by HTTP strings. This has some issues:

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:ng or did: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-server domain 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-server as 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions