-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DIP-267 Provide a User Data mechanism for links to profiles (#277)
Problem ======= #267 discusses the advantages of DSNP profile documents being discoverable based on a user's identifier, rather than being temporal data that must be externally tracked and indexed to be useful. Solution ======== This proposal adds a new User Data type, `profileResources`, which is currently defined for the Activity Content profile document type, but is extensible to other document types that may need to be user-centric in the future. A profile resource is simply a link type (as an integer) and a CID as a string plus byte length. We define link type 1 for AC profiles. This change assumes we are versioning for 1.3, but does not include versioning updates, which are in other open PRs at this time. Change summary: --------------- - [ ] ~~Updated Spec Versions~~ - [x] Added definition for ProfileResource Avro type - [x] Added entry in User Data page for `profileResource` - [x] Updated navigation; added ProfileResource, moved Profile announcement to "Migrated" section --------- Co-authored-by: Wes Biggs <wes.biggs@amplica.io>
- Loading branch information
Showing
8 changed files
with
107 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Migrated Announcements | ||
|
||
* [Graph Change](Types/GraphChange.md) | ||
* [Graph Change](Types/GraphChange.md) | ||
* [Profile](Types/Profile.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# ProfileResource | ||
|
||
A profile-linked resource is represented by the ProfileResource object type. | ||
|
||
## Serialization | ||
|
||
ProfileResource object serialization MUST conform to the following [Avro](https://avro.apache.org) schema: | ||
|
||
``` | ||
{ | ||
"namespace": "org.dsnp", | ||
"name": "ProfileResource", | ||
"type": "record", | ||
"doc": "Profile-linked resource", | ||
"fields": [ | ||
{ | ||
"name": "type", | ||
"type": "int", | ||
"doc": "Type of resource" | ||
}, | ||
{ | ||
"name": "cid", | ||
"type": "string", | ||
"doc": "Content IDentifier of resource" | ||
}, | ||
{ | ||
"name": "length", | ||
"type": "int", | ||
"doc": "Length of document in bytes" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Generation | ||
|
||
### type | ||
|
||
- MUST be a supported DSNP profile-linked resource type. | ||
|
||
#### Supported Profile-Linked Resource Types | ||
|
||
| Value | Description | Specification | Content Type | DSNP Version Added | | ||
| --- | --- | --- | --- | | ||
| 1 | Activity Content Profile with DSNP extensions | [DSNP Profile](../../ActivityContent/Types/Profile.md) | `application/json` | 1.3 | | ||
|
||
All other document type values are reserved for future expansion. | ||
|
||
### cid | ||
|
||
- MUST be a valid [DSNP CID](../Identifiers.md#dsnp-cid] | ||
|
||
### length | ||
|
||
- MUST be a positive integer | ||
- MUST match the length in bytes of the document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters