-
Notifications
You must be signed in to change notification settings - Fork 67
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
sockets client with backend service #23
Comments
At present, no. Later this year though we are planning on integrating change streams from the MongoDB server into Stitch to be able to get realtime updates on document changes. A temporary solution right now would involve using a service like pubnub and facilitating updates through pipelines that reach out to subscribed clients. |
Is there a solution other than external ones like PubNub yet? |
In the next month or so we will be adding a watch function to watch specific documents changing in a collection. Would this satisfy your use case? |
@edaniels sounds cool. Is this going to be available in React Native? |
@adrian-gierakowski I don't think react-native is an implementation detail concern for the back-end "watchers"/functions :-) |
Yes it will be! |
Does it make sense to use PubNub in a new project or is the implementation of change streams in the near future? |
@edaniels: any updates regarding timeline for this feature? |
Should be delivering this in a few weeks. No hard date though. |
We have just released this feature! See https://github.com/mongodb/stitch-js-sdk/releases/tag/v4.2.0 Unfortunately, we are not yet supporting for React Native, due to a lack of mature support for server-event events on that platform. On the Stitch backend, we use server-sent events to implement the streaming. I have opened a proposal for React Native to add support for SSEs, and you can track and vote on that that issue here: react-native-community/discussions-and-proposals#99 We wanted to prioritize getting this feature out for browsers and Node.js, but if you're still interesting in having this feature in React Native, please open another issue in this repo and we'll look into supporting it ourselves and robustly testing it using the polyfills that exist today. |
@adamchel according to: https://docs.mongodb.com/stitch-sdks/js-server/4/interfaces/remotemongocollection.html#watch ... Please note that this method does not support opening change streams on an entire collection or a specific query. The documents to watch must be explicitly specified by their _id ... Will opening change streams on an entire collection be possible in the near future? |
Are there any solutions for connecting clients to the backend via socket connection and updating clients over the socket connection when a model or record changes?
The text was updated successfully, but these errors were encountered: