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

Need ODM SDF Syntax to Cover Thing / Interface Object / Trait Version Mappings #60

Open
gerickson opened this issue Aug 14, 2019 · 5 comments
Labels
documentation Improvements or additions to documentation duplicate This issue or pull request already exists F2F4 Parking Lot Review PR WDL Related to Weave and the Weave Data Language and the ability for ODM SDF to losslessly express WDL.

Comments

@gerickson
Copy link

In Weave Data Language (WDL), interfaces are equivalent to ODM "things" and describe an abstract, contractual publish/subscribe interface for generic ecosystem interactions. Over time, the definition of the interface may evolve and its version incremented as those changes occur. To the extent that changes in the interface need to be bound to specific versions of one or more underlying traits (objects), WDL provides a construct in the form of the version_map decoration to specify those dependencies.

To be expressed in ODM SDF losslessly, a syntax construct for representing this version mapping, when present, is required.

Relevant Example Schema Input Files

Missing or Unmapped WDL-to-ODM SDF Syntax

  • version_map
    • This is an array of dictionaries specifying which specific versions of the traits comprising the interface are depended upon for a particular interface version. The dictionaries contain two keys: parent_version and dependent_version_list. Note that not all traits specified in the interface need be specified in the version map; they need only be specified if there are specific version requirements.
    • dependent_version_list
      • This is an array of dictionaries specifying the trait and version thereof that is to be bound for a particular interface version. The dictionaries contain two keys: name and version.
      • name
        The name of the trait on which the specific parent_version of this interface depends.
      • version
        The version of the named trait on which the specific parent_version of this interface depends.
    • parent_version
      • The specific version of the interface for which trait dependencies are being specified.

Example Input WDL

message BasicLockIface {
    option (wdl.message_type) = IFACE;

    option (wdl.iface) = {
        stability: ALPHA,
        vendor_id: 0x0000,
        version: 1
  };

    weave.trait.security.BoltLockTrait          lock             = 1;

    weave.trait.security.BoltLockSettingsTrait  lock_settings    = 2;

    weave.trait.auth.ApplicationKeysTrait       application_keys = 3;
}

message VoiceAssistantLockIface {
    option (wdl.message_type) = IFACE;

    option (wdl.iface) = {
        stability: ALPHA,
        vendor_id: NEST,
        version: 1,
        version_map: [
            {
                parent_version: 1, dependent_version_list: [
                    { name: "weave.trait.security.BoltLockTrait", version: 2 }
                ]
            }
        ]
    };

    weave.trait.security.BoltLockTrait bolt_lock = 1;
}
@mjkoster
Copy link
Contributor

mjkoster commented Aug 28, 2019

This should be resolved using the same mechanism as #67 so it seems to be a duplicate

@gerickson
Copy link
Author

Agreed that we can hopefully cover the requirement with the same approach. Not sure why Google didn't do so originally.

@gerickson gerickson added the WDL Related to Weave and the Weave Data Language and the ability for ODM SDF to losslessly express WDL. label Sep 6, 2019
@asoloway64
Copy link
Contributor

F2F4: OneDM Language and OneDM data models shall both be versioned (i.e. a "release tag" in github). When the models are "released", both the language and the models get the same "release tag". Changes to the language shall not require updates to the existing models. The language can be released without re-releasing the models.

@asoloway64
Copy link
Contributor

F2F4: Version negotiation would be a function of protocol binding and is not represented in the schema. The preferred way to adapt to changes in the data model is through feature and object discovery.

@mjkoster mjkoster added F2F4 documentation Improvements or additions to documentation Review PR labels Oct 1, 2019
@gerickson
Copy link
Author

What's the F2F4 recommendation for lossless representation in SDF for ecosystems like WDL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation duplicate This issue or pull request already exists F2F4 Parking Lot Review PR WDL Related to Weave and the Weave Data Language and the ability for ODM SDF to losslessly express WDL.
Projects
None yet
Development

No branches or pull requests

3 participants