Replies: 1 comment
-
You have to design your data model based on limited memory device instead of using Firebase in unlimited memory device as in mobile. You can listen on more paths using multiple |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
first of all thank you for this great library.
I'm trying to implement a stream on all my database to retrieve the data only when there is a change in any node, by using a callback function like in the "callback" example, and setting a flag to true in case a change happen to then retrieve my data in the loop function. The problem that I encounter is that because I'm starting the stream on the database root path I don't know if there's a way to know exactly the path where the data have changed, to only retrieve the data in that node, otherwise if I set a dataChanged flag to true I'm forced to retrieve the data from all the nodes because I don't know exactly where the change has happened. This data have to be saved in different variables to be used at later time (I have to trigger a GPIO opening sequence at a defined time). I have come with the idea to use different boolean flags for every node, setting them to true when the "stream.get(path)" is triggered in the streaming callback function but I'd like to know if there's an easier way to do this.
Starting the stream on the rooth path
Callback function listening to different paths
Data retrieve when data have changed
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions