Real-time updates
tnedich opened this issue · 6 comments
Good day,
I have written already about this issue but there was no clear solution or answer.
I am not expert but hobbyist. One of the meteor features is real time update of UI.
Again in version 2.1 of Pup (which h is great), there is no real time update. For example if two tabs are opened and in first one Document is added, that is not reflected in second tab.
If record (document) is deleted from MongoDB for example UI is not refreshed in those tabs.
I hope that I have explained issue. Will this be implemented in some release of Pup.
Hi @tnedich, at the moment real-time data is not enabled in Pup. The subscriptions implementation was removed in 2.1.0 due to unreliability and Meteor's publications and subscriptions are no longer used with the move to GraphQL in 2.0.0.
I'll be revisiting this in the future, though. Right now the recommendation is to rig up a websocket server/client set up to send data real-time (or, use Meteor's pub/sub system—the pieces are still in Pup, just not demonstrated [see v1.6.x or lower for examples]—if that makes sense).
First, thank you for this awesome boilerplate. I'm new to this stack, and since this is based on Meteor, also assumed this had support for sending data in real time. Question: Is there a reason why the subscriptions implementation was unreliable? Also, would you know if the following resource is a possible solution:
https://www.apollographql.com/docs/apollo-server/features/subscriptions/
Thank you so much for your help.
Hey @barelabs, primarily just a lack of understanding on my part. The link you shared was the method used but it was done in a convoluted way (I'd built the server implementation into an NPM package for re-use outside of Meteor which ended up being messier than necessary).
Not against having this as long as it's cleanly implemented and behaves as expected. Just need to spend some more time with it.
Good to know. Thanks for your explanation and clarification. It helps a lot. I definitely need real-time capabilities for my app, so I'll research this more and if I get this working reliably and in a clean way, I'll let you know.
We would be super keen to see this as well.
Since Ryan added the feature
label to this discussion, I'll drop this in here as we've been working on re-introducing real-time to Pup. It uses Meteor's existing DDP connection instead of a separate websocket, so that's one less client/server connection per user. Might be of interest if anyone else gets to it first: