Podcastindex-org / podping-hivewriter

The hive writer component of podping.
MIT License
15 stars 5 forks source link

Add new version of podping schema #26

Closed agates closed 2 years ago

agates commented 2 years ago

The current on-chains custom_json schema has some extra information we wont need with the change in #25.

Current schema:

{
    "version": "0.3",
    "num_urls": "<# of iris in 'urls'>",
    "reason": "reason code",
    "urls": ["list", "of", "iris"],
}

New proposed schema:

{
    "version": "1.0",
    "medium": "<ex: podcast>",
    "reason": "<ex: update>",
    "iris": ["list", "of", "iris"],
}

With num_urls being removed as redundant (any programming language has a way to get the length of a list, and the list will never been too large to worry about optimization of parsing for other, perhaps statistical, purposes).

medium is being added even though it also exists in the operation_id, just like reason, to allow for maximum portability and filtering even though it adds to payload size by a small amount.

urls is being changed to iris to match the language that already exists elsewhere in the application: This indicates that 1) the given RSS feeds do not have to be locators (perhaps supporting IPFS CIDs or magnet links, for example) and 2) the character set is "internationalized," supporting any UTF-8 character. Note that this has been assumed by podping-hivewriter since the initial release, this is merely a naming change we are doing now ahead of time.