geolocation push notification problem
I am trying to build a "messaging" app that uses distance criteria to receive messages.What I mean by that is that
"A-user" can send a message around him on 500 meters.So only "B" users that are 500m close to him can see his message.
I've created a database to upload messages,the coordinations of message and the distance.
I also succesfully build a page to load messages using the distance criteria.
.BUT My problem is on notification
I want to notify the users when a new message arrive.So I decided to use push notifications.
I know how to send a push notification from a device using the $nearSphere query.
My question is ,do every user has to update his location on database(device collection) every 30 seconds,in order to send a push notification??
I mean this is a lot of requests.
Do you have any idea how could I send the push notification from the senter and be seen only by users that around him N-meters?