Hi All,
Regarding Ping-pong I have a little bit different use case. Connection can be monitored by API which Ondrej showed in the previous mail. With this device can reconnect into cloud again. Cloud can set the policy that device should regularly send the ping message (regardless of CoAP over TCP signaling or resource request) to make sure the device is healthy. Cloud send the ping message,.. This is very strange… considering Cloud connection. However, there is no such a rule in OCF unfortunately. The other point for OCF TCP spec I’d like to say. CSM signaling, (CSM is the spec on the coap over tcp to handshake the capability of max send size and BTW.) >From the spec, 7.01 | CSM | <https://tools.ietf.org/html/rfc8323> RFC >8323 “One CSM MUST be sent by each endpoint at the start of the Transport >Connection.” from the spec. When the device connect to the Cloud, it will start the make the session and setup the tls, then device should send the CSM message and Cloud should send back the CMS message as handshake as far as CoAP over TCP spec. intends. But there is no clear comment how to use it CoAP over TCP spec. Furthermore, I cannot make sure whether cloud also should send the CMS message. There is no rule for this in detail in OCF as of now. I believe for the feasible interoperability, these also need to be clearly defined in OCF domain at least. BR, Uze Choi From: [email protected] [mailto:[email protected]] On Behalf Of John Zhang Sent: Thursday, November 01, 2018 12:11 PM To: Ondrej Tomcik; [email protected]; IoTivity Developer List Subject: Re: [dev] Maintaining a connection from Coap devices to the iotivity cloud Hi Ondrej, I have a quick question below. BR, John _____ [email protected] From: Ondrej Tomcik <mailto:[email protected]> Date: 2018-11-01 03:52 To: [email protected]; [email protected] Subject: Re: [dev] Maintaining a connection from Coap devices to the iotivity cloud ________________________________________ From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]] Sent: 31 October 2018 19:16 To: [email protected] Subject: Re: [dev] Maintaining a connection from Coap devices to the iotivity cloud On Wed, Oct 31, 2018 at 03:26 AM, Ondrej Tomcik wrote: What do you need such an often keep alive exchange for? If a connection breaks, the Coap device will no longer receive requests. Therefore I need it to try to reconnect as soon as this happens. The only existing mechanism I am aware of telling if the connection is broken is via the PING/PONG mechanism. -> yes, thats what ping pong is for. In case the connection was not closed gracefuly, you are waiting for a tcp timeout. If you want to know if the device is online, thats the only way. But you have to consider your requirements, how accurate information about the device status has to be? Additionaly, you should introduce timeouts for your requests. So not only ping the device every 5 seconds, what is actually a bad idea, but handle also request timeouts and flag the device as not reachable for example. Its your business logic, based on your requirements and SLAs. What kind of load? Not necessarily a specific load, but assuming an IOT cloud with thousands or more devices, I will expect the devices themselves to initiate the ping instead of the gateway, in order to take of some load from the gateway, but I guess this point is not clearcut. What is the purpose of the ping pong? To provide an accurate information if the device is there ( and delay statistics for example, ... ). Who is interested if the device is there? Cloud user. Who owns information if the device is online? Cloud. Cloud is the one who owns and maintains this information. Cloud should be responsible to ping the device to check if it is online. Device is not interested if cloud is there. You may have ping configuration per device, for some specific SLA use cases, but its cloud who has to accurately provide this information. [John] To keep the connection, do you mean the cloud should Ping the device rather than the other way around? Or either peer can send Ping message? -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9985): https://lists.iotivity.org/g/iotivity-dev/message/9985 Mute This Topic: https://lists.iotivity.org/mt/27796570/21656 Group Owner: [email protected] Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
