i trying make chat application based on suggestions in firebase documentation denormalizing.
i have list of chat rooms user part of in user node this:
{ "user": { "chat_ids": { "room_1_id": true, "room_2_id": true } } }
and chat node as:
{ "room_1_id": { "last_posted": "date" }, "room_2_id": { "last_posted": "date" } }
the chat node has rules prevent members aren't part of room read node. getting list of chat ids user node , getting details of each chat , attaching listeners each chat child detect change in them.
my question in case user part of 20+ chat rooms, there 20 listeners, cause performance issues? if there alternate way solve issue?
Comments
Post a Comment