When a pubsub channel or hook is created, for example using something as below (from the documentation):
SETCHAN warehouse NEARBY fleet FENCE POINT 33.462 -112.268 6000
one can use SUBSCRIBE warehouse to keep the connection open and listen to those events.
What happens when the subscription is closed. Will the channel still be emitting the events (even though no one is subscribed?)
Is there anyway we can know how many active subscribers are there for any given channel / hook currently?
The requirement is:
Users need to be able to create and monitor few fences. Number of users may vary for each fence, and users may go offline and stop watching their fence after some time.
What is the best way to organize this so that the server does not keep calculating and emitting events for channels and hooks that are being watched by no one? Does Tile38 takes care of it automatically (i.e. stops doing the intersection calculations when there are no subscribers) or should the app manage the lifetime?
The concern is about performance of live-queries when the number of fences is large.
When a pubsub channel or hook is created, for example using something as below (from the documentation):
one can use
SUBSCRIBE warehouse
to keep the connection open and listen to those events.The requirement is:
What is the best way to organize this so that the server does not keep calculating and emitting events for channels and hooks that are being watched by no one? Does Tile38 takes care of it automatically (i.e. stops doing the intersection calculations when there are no subscribers) or should the app manage the lifetime?
The concern is about performance of live-queries when the number of fences is large.