It seems we are starting to converge on an answer.  I will respond to your two 
points.
First, persistent storage.  I don?t understand why persistent storage is 
exclusively for security.  It is a historical artifact that security has been 
developed separately from the rest of IoTivity, worked on by a separate team.  
But I don?t know any reason for exclusivity in the storage.  The existence of 
security assures us that persistent storage is available, and we only need two 
bytes to store the current port number.
A further storage question is where IoTivity gets the Device ID (GUID) that is 
unique for each server.  I understand that this must also be persistent for 
everything to work. If it comes from the application, it is only available 
because there is persistent storage available to the application.
Second, random port assignment.  (These ports are also called Ephemeral ports.) 
 Each OS allocates these port according to rules that make sure no collisions 
occur.  For example, Linux allocates ephemeral ports in the range 32768 ? 
61000, so there is no chance that port 80 will be assigned.  (Thank you Dave 
Thaler for commenting on this.)
Please note that the port allocation rules have been working for decades.  The 
fixed assignments are based on the assumption that the minimum number of ports 
are defined for each usage.  Typically, IANA assigned ports are used for 
rendezvous and startup, and very few instances of multiple assignments will be 
found.  This is why HTTP scales across vast numbers of browsers and servers 
using only one assigned port number.   The IANA port assignments are a fixed 
resource that has to last forever.  We should respect that by following the 
rules.
John Light
Intel OTC OCF development


From: ???(Uze Choi) [mailto:[email protected]]
Sent: Sunday, May 01, 2016 7:45 PM
To: Light, John J <john.j.light at intel.com<mailto:john.j.light at 
intel.com>>; ashok.channa at samsung.com<mailto:ashok.channa at samsung.com>; 
'Dave Thaler' <dthaler at microsoft.com<mailto:dthaler at microsoft.com>>; 
Keane, Erich <erich.keane at intel.com<mailto:erich.keane at intel.com>>; 
Jacob_Gladish at cable.comcast.com<mailto:Jacob_Gladish at cable.comcast.com>; 
Macieira, Thiago <thiago.macieira at intel.com<mailto:thiago.macieira at 
intel.com>>; cftg at openconnectivity.org<mailto:cftg at openconnectivity.org>
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at 
lists.iotivity.org>
Subject: RE: [cftg] RE: [dev] [cftg] Re: [cftg] Re: Re: [cftg] Re: Re: [cftg] 
RE: OCF IANA Port Number Assignment

Thank you for your detail coding level design. However I?d like to claim two 
points.
One is persistence storage is for security exclusively for their purpose.
Other purpose beyond security is not eligible. Furthermore, it is not 
accessible in case of non-secure build,
You implementation requires additional persistence storage on somewhere which 
Ashok claims architecture concept change.
The other point is that initially random port assignment policy is also 
problematic.
IoTivity happen to assign the 80 port for example, then what happen?
Nomad should move out when original owner comes.
BR, Uze Choi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160502/398e6cd6/attachment.html>

Reply via email to