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

sockets client with backend service #23

Closed
crobinson42 opened this issue Jun 21, 2017 · 11 comments
Closed

sockets client with backend service #23

crobinson42 opened this issue Jun 21, 2017 · 11 comments

Comments

@crobinson42
Copy link

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?

@edaniels
Copy link
Contributor

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.

@edaniels edaniels reopened this Jun 21, 2017
@edaniels edaniels closed this as completed Dec 8, 2017
@jwchang0206
Copy link

Is there a solution other than external ones like PubNub yet?
It is November 2018.

@edaniels
Copy link
Contributor

edaniels commented Nov 3, 2018

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 edaniels reopened this Nov 3, 2018
@adrian-gierakowski
Copy link

@edaniels sounds cool. Is this going to be available in React Native?

@crobinson42
Copy link
Author

@adrian-gierakowski I don't think react-native is an implementation detail concern for the back-end "watchers"/functions :-)

@edaniels
Copy link
Contributor

Yes it will be!

@lmachens
Copy link

lmachens commented Dec 6, 2018

Does it make sense to use PubNub in a new project or is the implementation of change streams in the near future?

@adrian-gierakowski
Copy link

@edaniels: any updates regarding timeline for this feature?

@edaniels
Copy link
Contributor

edaniels commented Jan 7, 2019

Should be delivering this in a few weeks. No hard date though.

@adamchel
Copy link
Contributor

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.

@boustanihani
Copy link

@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?

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

7 participants