-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define guidelines for geofencing implementation #133
Comments
For your consideration @bigludo7, @akoshunyadi, @alpaycetin74 , @javier-carrocalabor (and others of course :) |
hello,
(On a side note, this also makes me think if initialTriggerAreaEntered is true, i.e.the client wants to know if the device was already in G, maybe we should define an upperbound for the age of location information. The network may have a location information saying the device is already inside G, but the information may be too old and stale.)
Thank you. |
The reference to the other event is to make clear that So, properly it should say:
|
Another point that we should also probably discuss here is at subscription time. Suppose we get a subscription for an area not covered or below a given percentage, or, for an area too small to be valid (N% will never be above x with current network ). I tend to think that we must be pro-active on this and refuse the subscription with a explicit message. So we must add this capability in our API. Probably this extra layer of checking could challenge our capability to answer synchronously to the call so also I'm wondering if we should not add capability to answer asynchronously to geofencing request. |
Interesting point. Adding such a capability, to create subscriptions asynchronously, would require adapting the model in Commonalities. But another option is to rely on the current notification system, accepting always the subscription request, synchronously, but defining new TerminationReason for subscription-ends, e.g. AREA_NOT_SUPPORTED |
@jlurien we have a conversation yesterday in Population Density Data API for same purpose --> camaraproject/PopulationDensityData#20.
I'm not sure for that as we have described[ implicit subscription].(https://github.com/camaraproject/Commonalities/blob/main/documentation/API-design-guidelines.md#instance-based-implicit-subscription) It could be a good start point no? |
I think that implicit subscriptions are a different case, but for Resource-based (explicit) subscription, I see now we already have:
But the 202 case is not detailed. In DeviceStatus they have specified both 201 and 202. So, if we take the "MUST" in the guidelines above as a mandate, we should add it to Geofencing as well, but I have doubts about how this 202 scenario is expected to work. Looking into DeviceStatus I see that with 202 a |
I just saw your PR at camaraproject/Commonalities#189 |
We are planing to use the entrance/exiting intersection ratio (D/N) in our initial implementation as internal configuration value of API since the geofencing API doesn't include any concept how the user can define them yet.
All cases has some potential flaws. Knowing the principle the consumer of the geofencing API can "customise" the fence area (assuming they are not consumed from some third party geo systems/maps). Akos proposed to use predefined presets (as a list of enums) for "overlapping" parameters. |
I think we could add such intersection ratio as a new parameter to the subscription creation. This would give the API consumer the possibility to adapt the API for his need. Otherwise I think the events won't fulfill the expectations. |
@ilya-smirnov-berlin @akoshunyadi To be sure I got your proposal, we offer the API consumer to pick an option during subscription (between 3) that I can reformulate this way (for device entered):
|
@bigludo7 exactly, using such categories makes the complexity for the user manageable. |
The ratios make sense to the implementation but we have to design the best approach for the customer to use it, as choosing a numeric ratio may not be understandable. My feeling is that for customers, the device location is seen mostly as a point, so the concept of intersection is not that evident. We know that for networks this is not the case. Qualitative options, as @bigludo7 proposes, may be more friendly. cc @javier-carrocalabor On the other hand, in location-verification we already have the concept of |
Based on latest comments I suggest an enum attribute with three values for ratios ~0, 0.5, 1.0
The attribute for the triggering can be optional with default value MEDIUM_CHECK (ratio 0.5)
Enum value names / attribute name (triggerSensibility) can be refined. Since we have currently only one type of event (exit/enter) the value can relate to the selected event. |
Good topic for next meeting discussion ! Adding @JoachimDahlgren and @alpaycetin74 to let them think about this. |
I find @ilya-smirnov-berlin 's proposal very useful. |
Qualitative values are more dev friendly, but as we are discussing here the guidelines for implementation (on the server side), we have to indicate some common criteria to map those values to the specific ratios for the formula. |
Also, we have to resume the discussion above for #133 (comment) it is also related with the discussion in: |
@jlurien & @bigludo7 I would like to come back to this discussion about the The suggestion by @ilya-smirnov-berlin is good for me and I would like to integrate such a solution for our Geofencing API as well. Wdyt? Shell we create an own issue for it? |
Problem description
As we saw with location-verification, the area where the network locates a device is not, or close to, a single point. It is an area that can be quite large compared with the geofence area. In order to decide when the device enters or leaves the geofence we have to agree on some rules based on the intersection of both areas.
Expected action
As we did with location-verification, we should discuss and agree on some guidelines for a common implementation.
Proposal (to start with):
In this case if we consider D (= area where network locates the device) and G (= geofence area), we may consider that:
area-entered
event is to be triggered when more than N% of D is within G, for the first time, or afterarea-left
has been triggered.area-left
event is to be triggered when, afterarea-entered
event has been already triggered, then more than N% of D is outside G."N%" thresholds are to be decided. Instead of 50%, we may choose a higher % to leave some safe gap between both, for example 60% .
The text was updated successfully, but these errors were encountered: