microg / IchnaeaNlpBackend

Backend for UnifiedNlp that uses Mozilla Location Service for geolocation.
116 stars 28 forks source link

Add caching #3

Closed haarp closed 9 years ago

haarp commented 9 years ago

Similar to the Apple Nlp backend, this backend should probably cache location results. This would improve data usage, responsiveness and privacy.

mar-v-in commented 9 years ago

Unlike Apple, the Ichnaea API does not respond with Wi-Fi AP locations, but calculates the location on the Mozilla server. The calculation considers signal quality of Cells and Wi-Fis. As the signal quality changes a lot, chances are low that the same location request is send twice, making request/response caches ineffective. Removing signal quality from request will nearly fix this (though even the visible Wi-Fis change a lot at a single place in a city), but also decrease accuracy. The only real case where caching makes sense is when only using cells without signal quality. This request will keep more or less stable when at a single location, however it will only allow location accuracy at city level. And if you're happy with that, you should use some offline gsm database backend.

-> I don't see how caching can be used meaningful here.