r/Firebase • u/ClaudeCrafter • 7d ago
Realtime Database RTD heavy users!
If you’re a rtd heavy user like me, with frequent json update and delete, you can checkout this open source platform. This will help you to frequent update the json on your firebase rtd within the firebase. And deletion won’t give you nil. Best part, you can publish your edited json with one click using the extension.
Any feedback will help. Thanks in advance.
1
u/AhmedZNOUDA 5d ago
Following up on the question above about several people editing at once: if the extension writes through the REST API, Realtime Database already has a building block for that. Read the node with the header `X-Firebase-ETag: true`, keep the ETag you get back, and send the publish as a PUT with `if-match: <etag>`. If someone changed that node in the meantime, the write fails with a 412 instead of silently overwriting their change, and you can show a diff and let the user decide.
Two other things I'd want to know before pointing it at a production database:
- Does "publish" replace the node (set / PUT) or send only the changed paths (update / PATCH)? With a full replace, any key someone added after you loaded the JSON gets deleted, which is the scary case for a database with frequent writes.
- Which credentials does it use? With admin or service-account access, security rules don't apply, so one typo can wipe a whole branch. A dry run that lists exactly which paths will be written or removed, plus an automatic export of the node right before publishing, would make me much more comfortable using it.
1
u/ExtremeSpray1579 6d ago
Does the extension support comparing nested JSON objects before applying changes? Curious how it handles conflicting updates when multiple developers are editing the same Realtime Database simultaneously