Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings Index #57

Closed
michaelsena opened this issue Jul 23, 2020 · 1 comment
Closed

Settings Index #57

michaelsena opened this issue Jul 23, 2020 · 1 comment

Comments

@michaelsena
Copy link
Member

michaelsena commented Jul 23, 2020

cip: 24
title: Settings Index
author: Michael Sena (@michaelsena), Paul LeCam (@PaulLeCam)
status: Draft
category: Standards
type: RFC
created: 2020-07-23
requires: Tile Doctype (CIP-8), DocId Map (CIP-10)

Simple Summary

Settings Index is a document that stores an index of global settings-related documents for a DID.

Abstract

In an identity-centric model of development, users carry their identity and resources with them across various contexts. Applications then use with these resources to provide service to the user. Portable settings allow interfaces and experiences to be contextualized and customized to the user's personal preferences, such as internationalization (commonly abbreviated as i18n) (locale, currency format), location (country of residence), accessibility (font size), appearance (dark mode), and more.

Settings Index is a document that stores an index of global settings-related documents for a DID. It does not actually store the DID's raw settings data, but rather serves as a way to route to the documents which do.

Settings Index is a subdirectory of the Identity Index (IDX) (CIP-11) and is usually linked from the Root index (CIP-12).

Motivation

The Settings Index seeks to:

  • Provide a single, standard interface for setting and querying categories of global settings
  • Provide discovery and routing to various documents that contain settings
  • Provide extensibility to support more categories of settings over time
  • Provide a reusable core component of identity that can work with any DID

Specification

The Settings Index specification consists of a doctype, schema, table, and tags.

Doctype

Settings Index uses the Tile Doctype (CIP-8).

Schema

Settings Index utilizes the DocId Map (CIP-10) schema, which simply stores a list of strings which map to Ceramic DocIds. In this case, the DocIds are pointers to various documents that store a user's settings information. A reference to this schema should be included in your Settings Index document when it is created.

Table

Settings Index Table (link when PR is submitted) contains the standard set of properties that may be contained in any given Settings Index. New properties can be added to the table by following the steps below. Additional properties not found in this table may be stored in any Settings Index, however they may be less interoperable since others may not know what they represent. Here are some common examples of properties stored in Settings Index:

  • i18n: a link to i18n Settings, a document which contains a DID's internationalization settings (i.e. locale, currency format)
  • location: a link to Location Settings, a document which contains a DID's location settings (i.e. country of residence)
  • accessibility: a link to Accessibility Settings, a document which contains a DID's accessibility settings (i.e. font size)
  • appearance: a link to Appearance Settings, a document which contains a DID's appearance settings (i.e. dark mode)

How to add a new property to the Settings Index Table

  1. Choose a unique, descriptive property name.
  2. Add a description for your property.
  3. Submit a PR to the CIP repository updating the Settings Index Table (link with PR) with your property.
  4. Mention the authors of this CIP in the comments of your PR.

Tags

When creating a Settings Index document, add the SettingsIndex tag to the document header.

Example

An example Settings Index document.

"doctype": "tile"
"schema": "<insert canonical schema for DocId Map>"
"tags": ["SettingsIndex", "DocIdMap"]
"content": {
  "i18n": "ceramic://bafyljsdf1",
  "location": "ceramic://bafysdfoijwe2",
  "accessibility": "ceramic://bafysdfoijwe3",
  "appearance": "ceramic://bafysdfoijwe4"
}

Rationale

Instead of storing all settings information in one single document, It makes more sense to create an index of settings-related documents which each store subsets of a user's settings. This design provides flexibility by allow new categories of settings to easily be added to the Settings Index without needing to revise the standard and minimizes the impact of updating individual schemas since they will not affect every other settings document. This design also improves performance by minimizing load time, since loading can be parallelized and users can only sync the needed subsets of information without always needing to load one ever-growing file.

Implementation

  • Settings Index Table: Find the Settings Index Table here. (Linked with PR)

  • DocId Map Schema: Find the DocId Map schema used by the Setting Index here. (Linked with PR)

  • Libraries: Not yet available.

Usage

Root Index: Since settings are only one type of resource that can be associated with a DID, it is advisable to add the Settings Index to a Root Index (CIP-12), which serves as a top-level index for a DID's resources. The recommended path from a DID to the Settings Index is: DID/Root Index/Settings Index.

Copyright

Copyright and related rights waived via CC0.

@oed
Copy link
Member

oed commented Sep 28, 2020

Stale, closing.

@oed oed closed this as completed Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants