Dear OSWG Members & Iotivity Maintainers,


Before I deep dive into topic, let me explain what default interface is in
short. When a client queries server for a resource without any "if" value,
it is default interface who guides the resource to send appropriate
response.



There is ongoing discussion regarding how to inform default interface of a
resource to client. OIC Spec defines 1st interface in order for value of
"if" property in payload should be considered as default interface. OIC Spec
also allows a resource to override spec defined default interface.

There has been multiple views regarding what default interface should do &
how it should be handled. Following are few options with their pros and cons
as given below. [Option 3 is from Spec while 1 & 2 are just opinion I heard
during discussion for this topic]



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.



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.



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.



Thoughts please?



Regards

Dwarka

----------------------------------------------------------------------------
------

Software R&D Center | Software Platform Team | IoT Lab

Open Interconnect Consortium - Open Source Work Group Member

Iotivity Steering Group - Advisory Committee



-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160202/c252bfb2/attachment.html>

Reply via email to