Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse subscriptions after a disconnect/connect cycle on mobile apps #7

Open
joaopiopedreira opened this issue May 22, 2015 · 0 comments

Comments

@joaopiopedreira
Copy link

Hi @richsilv , I'm using your package in a mobile app (meteor-cordova app), already in pre-production.

I had 2 main problems to solve in this app:

  • Treat static, potentially big collections outside of meteor livedata package (no pub/sub): got this with your package (thank you for that!); I'll post some issues I'm having with it and a couple of improvement suggestions in another issue;
  • Try to reuse subscriptions between offline/online transitions, even when the browser refreshes. This is to avoid the overhead caused by reloading all data associated to subscribed collections on an offline/online transition (my users may be in zones with a poor network coverage, experiencing many reloads in a short intervals of time)

This last issue is giving me some work. It's a hard problem to solve. I though I could hold on to the subscription handle, save it in local storage and then find a way to reuse it like this:

//subsHandle holds the subs object before refresh
// after refresh, I could hold on to it like:
subsHandle = Meteor.subscribe(...)

But it's not that simple. Do you think there's a way to achieve this?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant