Risk of race condition between initial find and update event on the client? #3591
Unanswered
GeorgBraun
asked this question in
Q&A
Replies: 2 comments 4 replies
-
You'd listen to all the events you want to get updates first whenever your application loads and then update any data accordingly. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, David. Is there a chance or risk that data from a large What I am worried about is that data from a |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I am wondering if there is a risk for a race condition between the initial find and an update event on the client side.
Let's assume the client triggers an initial
find()
for some data which is handled by the server. The server collects the data and sends it to the client. The client receives the data and then subscribes to update events to get real time updates.If the data changes right after the server responded to the initial
find()
and before the client could setup the update listener, is the updated data lost from the client's point of view?If the answer is "yes", could this be avoided if the client first subscribes to update events and then fires the
find()
? But then, how can the client know which data is more recent? The one from the update event handler or the one from thefind()
result?Many thanks and best regards,
Georg
Beta Was this translation helpful? Give feedback.
All reactions