Hey all, so I've got a programming question. For agora, I'm using meteor, a JS framework built on node. (Yes, I know. I picked it out years ago when I didn't know better and I don't have the time to rewrite it. :X) Anyway, it pulls data from the server using subscriptions, which are nice cause they're reactive (They update when the data changes). The downside is they're relatively heavy. Anyway, at the moment I just have one subscription for all the data in the site, but that won't scale. So I need to have some kind of dynamic subscription. But I'm not sure whether to subscribe to each post, or try and package things. Please advise?
https://agora-2866.nodechef.com/forum?post=RKisZRxRs6hg6KdS7
@Angle Perhaps use GraphQL to let the client determine what to subscribe to. Writing the backend mutation to the graphql is much less work than it seems and will save you the burden of decision.
@Fumon Hmm, that does look interesting. I'm not sure how easy or hard it would be to switch to it? I'll definitely consider it though. :/
@Fumon I'm not sure what you mean. You mean having it on the backend, having it pick out the documents to package into the subscriptions for the client? :/
@Fumon Hmm, that sounds like a useful approach. And then when you want to load a new post, it edits one of the ongoing subscriptions to include it? :/
@Angle Something like that. I'm not super familiar with your application but it sounds plausible. I haven't use meteor in a long long time.
@Angle Well, that's part of it. The other part is letting the client tell the server which bits its interested in by using GraphQL (which makes this super easy to reason about in the code)