1

It's quite common that while working with firebase our apps have queries consisting of more than one call. Let's say, we are fetching ids from one list (e.g. posts_by_user) and adding them to the other (e.g. user_feed).

In this case we subscribe to the posts_by_user/id list and once value is fetched, we add each id to the user_feed.

Now, what would happen if a user leaves the page/app half-way through the process of adding post ids to the feed? Since all operations are managed on the client, how would the firebase behave?

I was just thinking that such scenario can be quite common. Maybe I'm misunderstanding something. Otherwise, how are such situations normally handled?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • You'd use a multi-location update to prevent partial updates. See my answer here: http://stackoverflow.com/questions/17437695/firebase-how-do-i-update-multiple-resources-atomically/17438028#17438028 – Frank van Puffelen Jan 27 '17 at 10:08

0 Answers0