On Tuesday 02 February 2016 14:38:25 Dwarkaprasad Dayama wrote: > Option 1 - > > Default interface is clearly defined for each resource. Overriding interface > type is not allowed. > > > Pros - No surprises for a client due to prior knowledge of default interface > for each resource. > > Cons - Higher memory footprint due to storage of default interface > information for every resource. Spec to become bulky as on new resources are > added. Spec lose the flexibility advantage to let a resource decide its own > default interface.
That's an acceptable solution. I don't see the Con as you described: what would need to store the default interface information for every resource and why? The way I see it, no one needs to store anything. Can you explain where storage would be necessary? The spec becoming bigger is not a problem. This is just an extra definition for each interface type. > Option 2 - > > Single or Common default interface for all resources. Overriding interface > type is not allowed. > > Pros - Fixed memory footprint and easy to maintain. No surprises for client > due to only 1 interface type to be handled for all resources. > > Cons - Constraint devices & network to have trouble if selected interface > sends more than required data. Spec becomes bounded and no scope of > extension when new resources or verticals are added. This is also an acceptable solution. I again don't understand what the Cons are. Let's say the default for everything is oic.if.baseline: what kind of resource type would have a different interface that produces less data? Please make sure to answer with a resource type likely to be implemented by a constrained device -- a group resource isn't. > Option 3 - > > Default interface is defined in general or specifically depending on > resource. Overriding the interface type is allowed. 1st interface listed in > "if" property value is default interface. > > Pros - No need of prior knowledge. Smart way to identify the default > interface. Small memory footprint. Spec gains flexibility advantage and will > be lighter even if more resources are added. > > Cons - Need strong safe guarding mechanism to make sure there are no > surprises. Software maintenance becomes tricky as on more resources are > added. I think this is not an acceptable solution. Additional Con: since the default interface is unknown without first querying the device, no one will write code that uses the default interface. Conclusion: default interfaces are useless and we could just as well remove them from the spec. For that reason, I also dispute your Pro too. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center