Hi John/Ashok/Jon

The more fundamental reason for the static port binding is to preserve the
same server configuration (UUID, IP, Port) as much as possible in case of
re-boot.

If we can get the similar result without static port assignment, it could
be acceptable.

I think, IoTivity initiate from specific standard port number by default
will also satisfy my initial requirement.
,because we can expect there is single IoTivity instance from OIIC server
perspective from most of device.

We can think about the other possible design as like upper proposal rather
than ?It appears that a desire to support static binding did come up after
all.?.

BR, Uze Choi

From: Light, John J [mailto:[email protected]] 
Sent: Thursday, January 28, 2016 1:58 AM
To: ashok.channa at samsung.com; Uze Choi; 'Jon A. Cruz'; jaekeun lee;
Macieira, Thiago; iotivity-dev at lists.iotivity.org; Markus Jung
Subject: RE: Re: [dev] Need API to set static "sid" and "port number".



Ashok,

Please explain how requesting an IANA number ?increase[s] the user
experience?.  It may change the experience of an application developer
slightly.

John



From: ASHOKBABU CHANNA [mailto:[email protected]] 
Sent: Tuesday, January 26, 2016 9:15 PM
To: Light, John J; Uze Choi; 'Jon A. Cruz'; jaekeun lee; Macieira, Thiago;
iotivity-dev at lists.iotivity.org; Markus Jung
Subject: Re: Re: [dev] Need API to set static "sid" and "port number".



Hi,



To minimize the changes and also to increase the user experience, can we
reserve a port with IANA for IoTivity?   <https://www.iana.org/form/ports-
services> https://www.iana.org/form/ports-services. (Not sure who can apply
for this)



This solves multiple problems

1) Minimize the changes in Base layer.

2) Application does not require to store and retrieve the previously
configured ports.

3) If it fails to bind, anyway it has to retry other ports.



Previously we fixed 5298/6298 ports temporarily but as they are reserved,
we moved to system assigned ports.

As IoTivity supports multiple transports (BLE/BT), new API for only IP
network will be strange for some developers.



Regards,

Ashok

------- Original Message -------

Sender : Light, John J<john.j.light at intel.com>

Date : Jan 26, 2016 23:10 (GMT+05:30)

Title : Re: [dev] Need API to set static "sid" and "port number".





Uze Choi and Jon,

I want to get on the table that implementing your proposal may be difficult
and must be done carefully.  The structure of IoTivity doesn?t make the
change easy, and there are some possible pitfalls.

First is that there are two ways to start IoTivity: OCInit() and OCInit1().
OCInit() is the original init, and it has the port argument you want.  When
I added IPv6, I needed additional arguments, so I added OCInit1(), with the
needed arguments to allow configuring IPv6.  Since this was an addition to
the API, I asked for help from the maintainers, but received none, so it is
my invention as it stands.   Since I could see that some arguments of
OCInit() were not used, I didn?t include them in OCInit1().  Among the
removed arguments is the port number.

If we upgrade OCInit() to use the port number, we need to also provide a
way to do OCInit1() functionality with a port number so you can do the same
thing with IPv6.  Perhaps OCInit2()?

The second issue is the startup path has some difficulties that will need
to be worked out.  New error codes will need to be added to address this
issue, and the IP adapter will need to recognize the condition.  The larger
problem is that the semantics of starting up are not compatible now.
Specifically, right now if any adapter starts up, errors in other adapters
(including the one you want) are ignored.  This existing behavior will have
to be reconsidered.  Finally, even if there is only one adapter (IP),
OCSelectNetwork in ocstack.c doesn?t propagate error codes, returning only
CA_STATUS_FAILED and CA_STATUS_OK.

I still think this is a bad idea, but I wanted to provide information for a
change if it is going to be done.

John Light
Intel OTC OIC development



From: ???(Uze Choi) [mailto:[email protected]] 
Sent: Monday, January 25, 2016 9:49 PM
To: Light, John J; 'Jon A. Cruz'; jjack.lee at samsung.com; Macieira, Thiago;
iotivity-dev at lists.iotivity.org; markus.jung at samsung.com
Subject: RE: [dev] Need API to set static "sid" and "port number".



Hi Jon/John,

I agree ?We know that the ?try? can be unsuccessful, so a discovery
fallback is inevitable.? So that we need implement rediscovery UI for
fallback case.
However, if try is successful, we can reduce the step to re-discover which
will bring the big benefit to user from UI perspective.

How about including this issue into the Jira ticket for in this coming
1.1.0 release?
Markus, could you help it?

BR, Uze Choi

From: [email protected] [mailto:iotivity-dev-
bounces at lists.iotivity.org] On Behalf Of Light, John J
Sent: Tuesday, January 26, 2016 6:38 AM
To: Jon A. Cruz; jjack.lee at samsung.com; Macieira, Thiago; iotivity-
dev at lists.iotivity.org
Subject: Re: [dev] Need API to set static "sid" and "port number".



Jon,

I don?t see any attempt to propose static port binding, so the request
doesn?t violate any OIC intent.  In any case, since a node might support
multiple servers, static port binding wouldn?t work.

I understand the request is to make a server ?try? to use a port that it
used in a previous run.  We know that the ?try? can be unsuccessful, so a
discovery fallback is inevitable.

John Light



From: Jon A. Cruz [mailto:[email protected]] 
Sent: Monday, January 25, 2016 1:30 PM
To: Light, John J; jjack.lee at samsung.com; Macieira, Thiago; iotivity-
dev at lists.iotivity.org
Subject: Re: [dev] Need API to set static "sid" and "port number".



One aspect here sounds like code is depending on IoTivity devices to
operate like some other common servers where HTTP is on port 80, telnet is
on port 23, ssh on port 22, SMTP is on port 25, etc. Compliance with
company IT policies, firewall requirements, vpn rules, etc. might come into
play there.

If this is so, then a question would be to ask if such port-bound services
were counter to the OIC intent, within the OIC intent or un-addressed by it.


On the other hand, if it is just code counting on finding a device by using
address+port as a key, then I would share concerns on such software being
fragile.

On 01/22/2016 08:20 AM, Light, John J wrote:

Jack Lee (?),

In OCDoResource, you can supply a port number in the OCDevAddr argument.
Network layer will use it, just as in original IoTivity.  So the same
functionality exists.

I still have reservations about the design of counting on port numbers
persisting.

John



From: [email protected] [mailto:iotivity-dev-
bounces at lists.iotivity.org] On Behalf Of ???
Sent: Thursday, January 21, 2016 9:47 PM
To: Macieira, Thiago; iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Need API to set static "sid" and "port number".



-

OCDoResource()  must set port number.

How can forget it? If you right, then iotivity should be redesign. 

Because, OCDoResource() has port number dependency.



If we support just one optional api, we can reduce re-discovery problem.

I don't understand why did yoy object to add "OPTIONAL" api although it can
provide very useful user exprience.



And, old version iotivity could set port number... there is no issue about
development







------- Original Message -------

Sender : Thiago Macieira<thiago.macieira at intel.com>

Date : 2016-01-22 14:19 (GMT+09:00)

Title : Re: [dev] Need API to set static "sid" and "port number".



On Friday 22 January 2016 02:25:47 jaekeun lee wrote:
> I didn't say that change the mechanism.
> I said, support the additional API for set to port number and sid or
> di(variable name is sid)  is very useful and helpful. 
> The experience depends on how the application is written
> How can fix this issue?
> - Presence Check -> Re-Discovery -> Check saved DI & discovered DI ->
change
> target's IP/PORT or
> - re configure every run
> These are very inconvenience .
>  
> But, if server can set port, then re-configure only when server not
work(may
> be ip changed or port occupied). 
> Just additional API.

Forget the port number. If your other side is trying to depend on the port 
number, please redesign it. You cannot count on the port number being free,
so 
your other side must be able to deal with the port number changing.

For that matter, the IP might change after a reboot. Or even without a
reboot: 
IPv6 temporary addresses change about once a day. Since you can't count on
the 
IP being fixed, port numbers don't identify anything.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center









<http://ext.samsung.net/mailcheck/SeenTimeChecker?do=28bccb0e7a1e0d063f43730
47812202bf86cbca82d54dcb7a1889aa8efbbee47738ed17e7639ce1f641b1a8c451b0736562
39170f5eb4b5c326bbdfb2ea96a2fcf878f9a26ce15a0> 

-------------- next part --------------
HTML ?????? ??????????????...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160128/56730617/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: ?????? ?? ????????.
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160128/56730617/attachment.gif>

Reply via email to