Ah, yes, " You will not get notified when a new server comes online.". But that would be true for each server that calls startPresence()?
On Tue, Dec 12, 2017 at 3:16 PM, Morrow, Joseph L <[email protected] > wrote: > Hi David, > > Presence does not align with “Advertisement.” You will not get notified > when a new server comes online. > > A way to achieve this is to implement a Resource Directory in your set-up. > Assume every client observes the Resource Directory. As per my understand, > Then every Server in your set-up should Post to the Resource Directory that > it has come online. Then I believe every Client should be notified of the > new Server posting itself into the resource directory. I have not worked > with the Resource Directory directly before. This is how I understand it to > work, however. > > Thanks, > > Joey Morrow > > From: David Brody <[email protected]> > Date: Tuesday, December 12, 2017 at 3:09 PM > To: Joseph L Morrow <[email protected]> > Cc: Gregg Reynolds <[email protected]>, iotivity-dev < > [email protected]> > > Subject: Re: [dev] Multiple presence server/client on same network > > Hey guys, thanks. I was able to fix my issue by setting it all to > CT_IP_USE_V4. > > Joseph - thanks for the clarity on this. it does seem that presence is a > bit more generic than resources since IoTivity only provides the > hostAddress of the presence. Nothing about which resource, etc initiated it. > > You also note that: > > - IoTivity offers Discovery to check who’s all out there > - IoTivity offers Presence to see when someone has left > - IoTivity does NOT offer what I would term “Advertisement” to see > when someone new has come. (You may be able to attain this functionality > with a Resource Directory, however.) > > Does subscribing to Presence not align with "Advertisement"? It seems that > subscribing to Presence will get notified whenever another device (a unique > hostAddress) comes online. Is this not the right way of thinking about it? > > > > On Tue, Dec 12, 2017 at 2:38 PM, Morrow, Joseph L < > [email protected]> wrote: > >> The OIC Spec referred to IoTivity’s Presence feature as “Advertisement.” >> >> Please do not mix up OIC’s use of the word “Advertisement” with my use of >> it at the bottom of my email response below. >> >> Thanks, >> >> Joey Morrow >> >> From: Joseph L Morrow <[email protected]> >> Date: Tuesday, December 12, 2017 at 2:37 PM >> To: Gregg Reynolds <[email protected]>, David Brody <[email protected]> >> Cc: iotivity-dev <[email protected]> >> Subject: Re: [dev] Multiple presence server/client on same network >> >> Hi Gregg, >> >> The OIC spec used to have “Advertisement” specified. But in push to move >> OCF and get a spec out, advertisement was removed. At the time, I recall >> someone stated the intention was to bring it back immediately after OCF 1.0. >> >> As you can see it never did. >> >> I can give you some hints of what presence did at the time of >> implementation: >> >> - Presence functionality is re-using Observe functionality (code >> re-use). Except, it’s effectively an Observe-Get response to the “oic/ad” >> virtual resource. (This is specified in draft versions of OIC. Try >> checking >> 0.9 or prior.) >> - A Presence Notification goes out at Presence start, stop, some TTL, >> and every time an Observe Notification occurs. (Every time you invoke >> Notify(), the IoTivity stack also invokes something akin to >> “PresenceNotifyAll().”) >> - Notifications for Presence do not contain any useful information >> about what has changed. The presence payload should contain a >> ResourceType if the Presence Notification was caused by an >> ObserveNotification. >> - Presence also implements a TTL feature. If not set by server >> application when invoking “StartPresence(int secs = 60)”, then at 50% >> (and >> maybe 70%, 80%, 95%, 100%) of 60 seconds, a new Presence Notification will >> go out unicast to each presence observers. Note “Presence Observers” are >> called “subscribers.” The client side API offers “SubscribePresence().” >> >> If I may add, IoTivity offers Discovery to check who’s all out there. >> IoTivity offers Presence to see when someone has left. IoTivity does NOT >> offer what I would term “Advertisement” to see when someone new has come. >> (You may be able to attain this functionality with a Resource Directory, >> however.) >> >> Thanks, >> >> Joey Morrow >> >> From: <[email protected]> on behalf of Gregg >> Reynolds <[email protected]> >> Date: Tuesday, December 12, 2017 at 2:19 PM >> To: David Brody <[email protected]> >> Cc: iotivity-dev <[email protected]> >> Subject: Re: [dev] Multiple presence server/client on same network >> >> >> >> On Dec 12, 2017 10:03 AM, "David Brody" <[email protected]> wrote: >> >> .. >> >> Any help or clarity would be GREATLY appreciated. The documentation on >> this is very limited and I've dug into the code a bit too far with no luck. >> >> >> Sorry I cannot help, but if you don't mind I'll piggyback here and ask if >> somebody can explain "presence". It is not in the OCF specs. What is in the >> specs is advertising discovery, but the text is indecipherable, to me at >> least. "Resource to enable discovery" gets my vote as the most impenetrable >> (and inane) phrase ever written in a tech spec. Have read the spec 123 >> times, still have no idea what it means. >> >> -g >> > >
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
