Firepad is storing all my content in a firebase real-time database. using javascript to get and store data in firebase.
In my application there a page which has firepad to write content and also a save button to store that content in SQL.
There is a edit feature to edit that content, so whenever user click on edit than it get data from SQL and put into firepad to edit and that content also again store into firepad as firepad is directly connected with firebase.
in my system, more than one user can edit on that firepad page at the same time.
now problem is If I am editing a page, my edits will be deleted if someone else click on edit and starts editing on that firepad page at the same time. this happens because whenever edit button is click it again take data from SQL and put into that firepad.
to resolve this i have planed to add a change as below :
1) When someone saves a page, it also store the Firebase timestamp in SQL.
2) When someone opens a page for editing, it load the page from SQL Server (like happening right now) but it also load ALL CHANGES SINCE STORED TIMESTAMP from Firebase.
i am able to get last timestamp value when user has saved data from firebase, but not able to find solution to get only that data which are stored after a certain timestamp in firebase.
for example, as mentioned in below snap, i have a timestamp like 1536583211004 and now i wants to get data after that particular timestamp only.
above is structure of firebase data.
how can i get and put data in firepad after a particular timestamp from firebase?
Expected result data should be of B3H, B3I, B3J, B3k (check above snap for this value)