one-data-model / language

(Old repo:) Simple Definition Format (SDF) for One Data Model definitions
7 stars 4 forks source link

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

Open gerickson opened 5 years ago

gerickson commented 5 years ago

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 _versionmap 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

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 commented 5 years ago

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

gerickson commented 5 years ago

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

asoloway64 commented 5 years ago

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 commented 5 years ago

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.

gerickson commented 5 years ago

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