-
Notifications
You must be signed in to change notification settings - Fork 108
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
Record listens should return the amount of subscribers interested in the record #74
Comments
The ds-demo dependencies are out of date. Will look at it in the next hour and keep you updated. |
Hey! Right so you were totally correct. This is actually a design issue I'll discuss with the rest of the core team tomorrow. We might need to have a different kind of record which is a silent requester so that is doesn't let deepstream know it has the the record. I think that would probably be quite a bit of work tho so will sleep over a solution. This works great for events so far since they are stateless, but I can see this happening often with records. Thanks for raising! |
So we have decided on the following as an API change record.listen( '/bob/', function( recordName, numberOfSubscribers ) { This way if numberOfSubscribers === 1 and your already providing it you would know to stop. Thoughts? |
That is a reasonable solution. Will the function be called per subscription? What happens when transitioning from 1 to 2 subscribers? 1 to 0? |
Should be called everytime a match occur. Will try implementing today and let you know! |
Any updates on this issue? |
Not yet, it will be in our next release but we are currently focusing on getting a couple more tutorials out on how to use deepstream with different front-end libraries. |
Not to derail the original topic, but I am very interested to see these tutorials. Have any links? |
They are still a work in progress. Currently polymer elements and a react mixin. Should be issues on website repo you can follow! |
We need to think of a better way to indicate if a record is subscribed to or not than providing numbers. |
…nt-size Fix #75 reduce the bundle by ignoring the TCP connection class in bro…
Given the ds-demo-provider, generator will never stop generating after first subscription.
Stepping through the logic:
FX/*
recordisSubscribed
is truefx-data-provider
subscribes toFX/*
recordI was hoping to have on-demand providers in my current project.
Any suggestions on how to resolve this issue?
The text was updated successfully, but these errors were encountered: