How to use Firebase for statistics?

后端 未结 1 1378
闹比i
闹比i 2021-01-14 09:05

I am working on a system where users can subscribe to places and places can see these users in their CMS. But now I want to create statistics for the places.

Some o

相关标签:
1条回答
  • 2021-01-14 09:49

    Unlike most traditional SQL databases, Firebase's Realtime Database is not well suited for ad-hoc aggregation queries. You will have to know up front what stats you want to track and update them as the data streams into/through your system.

    Doing this client-side is certainly possible, but indeed not ideal. This is a perfect use-case for using the just-released Cloud Functions for Firebase. It falls closest to the use-case of sanitizing incoming messages:

    A good, simple example of an aggregation function is this child counter.

    0 讨论(0)
提交回复
热议问题