ground-db icon indicating copy to clipboard operation
ground-db copied to clipboard

Subscriptions

Open doubletaketech opened this issue 10 years ago • 5 comments

How does GroundDB work with Subscriptions? I have subscriptions that don't load all the data in a collection. They load a subset of filtered results.

If I Ground this collection, will it download ALL the documents in the collection? Or just what the subscriptions are asking for?

Thanks, Don

doubletaketech avatar Mar 01 '15 01:03 doubletaketech

If I'm correct it "grounds" the entire collection

isAlmogK avatar Mar 01 '15 15:03 isAlmogK

Thats what it looks like. Major showstopper for me. I have too much data in my collections to ground it all. I need subscription-grounding :)

Based on my testing Ground crashes the app on client startup when you have a lot of data. Load app in browser. Close Browser. Re-open app. Crash. I remove GroundDB and ground calls, and the app is fine.

I need a solution for a mobile web app to run offline even and persist data even if the user closes the browser and re-opens the app. It must support grounding only the filtered collection data I have in my subs.

Thanks, Don

doubletaketech avatar Mar 01 '15 16:03 doubletaketech

I just tested this and I added a filter on the subscription find and then looked in the browser's localStorage and it only had the matching records in there. I could have misunderstood what was being asked but it looks to me that only the filtered subscription is being grounded and not the entire collection.

malhal avatar Aug 04 '15 12:08 malhal

@malhal ground db respects the data publication - thats the main issue when using iron router.

raix avatar Aug 04 '15 20:08 raix

@raix Is it possible to grounddb to keep adding entries to the grounded collection as the user navigates to other routes? (without erasing the old entries or publishing the whole collection)

Eg: Collection with players.

  1. Grounded data is empty
  2. User navigates to /top10 (where only top 10 players are published)
  3. Grounded data has 10 records
  4. User navigates to /bottom10 (where only bottom 10 players are published)
  5. Grounded data has 20 records (top 10 and bottom 10)

Edit: ok, now I see GroundMeteor/subscriptions is the way. :stuck_out_tongue:

comigor avatar Aug 07 '15 17:08 comigor