Publish Only Things Who Were Read 10seconds Ago From Now
Solution 1:
Meteor publications work in a way that is causing you this problem...
Data is published selectively from the server. But once published, it is not removed from the client side collection. So your client side data is growing over time as more and more data is published.
So you will need to do a filter in your client code (ie your subscription) as well. That will fix the problem. It will, however, rely on exact time synchronisation between client and server.
Over time your client side collection will also grow, and eventually cause you some memory/performance problems. So you might want to consider a different approach. You could create a separate collection which is managed by the server, to just contain the last 10s of data. Older data is deleted, and the client subscription is simple, with no need for precise clock sync between client and server.
Post a Comment for "Publish Only Things Who Were Read 10seconds Ago From Now"