DefineX-Studios / MasjidBuddy

Application that provides a platform for local masjids to provide services online.
MIT License
0 stars 0 forks source link

[WIP] optimize filtering masjid using geofencing #34

Open adsau59 opened 9 months ago

adsau59 commented 9 months ago

Motivation

Currently all masjids are fetched and shown in order of distances which isn't scalable when alot of masjids are added down the line

to solve this issue, we can filter out the list of masjids from the backend so that client doesn't have to do any calculation and simply can render the masjids directly

this can be achieved by following steps

  1. client sends request to get masjid using its own geo location
  2. using the coordinates server checks for a pre filtered list of masjid form a nearby location
  3. if it doesn't exist, it filters using better yet the area being displayed in the map
  4. then it returns the list, using which client can sort and calculate exact distance on their own

Design

Implementation

Breakdown

adsau59 commented 6 months ago

laptop had issues for sometime, just completed the project setup... will continue with the task now

adsau59 commented 6 months ago
adsau59 commented 6 months ago

create logic to get callback only when region stops moving

there was already a callback onRegionChangeComplete which does that

adsau59 commented 6 months ago

there are two ways to do it

will try through tables first