I find the Firebase sample database very useful, but I noticed something that bothers me a bit.
I mean, in this example, the user can give the star a message, something like “Like it” on Facebook. In the presented sample, they insert stars in the message, so we have an example of an object as follows:
"post_id" : { "author": "username", "body": "Some content", "starCount": 1 "stars" : { "user_id_who_gave_star" : "true" } "title": "Some title", "uid": "author_id" }
Such a solution has many advantages, such as, for example, we can check whether the star icon is already indicated and hide or change, or we can change the starCount one transaction and add the next value to the stars.
But the problem is that we have a large application, and 1000 users gave a star, so every time we download postdata, we load 1000 userIds, which may not be the best solution.
Question
My question is what works best for such applications and someone tested how Firebase works in this situation?
source share