What is the best way to show reports with firebase?

穿精又带淫゛_ 提交于 2021-01-28 07:54:06

问题


I am currently using Cloud Functions to do aggregation in Firebase so that whenever a certain type of data entry occurs, I aggregate it accordingly and store it to show our reports. There are following concerns with this approach:-

  1. Adding new reports would mean going over all the existing data and that could be expensive with firebase realtime database
  2. Making any changes to existing reports is also non-trivial

I was considering a solution like Cloud Dataflow. However, one issue is that it is not part of the Spark or Flame plan of Firebase.

What is the best way to handle reporting with firebase, keeping both cost and performance in mind?


回答1:


Recommending a specific reporting solution is off-topic on Stack Overflow.

But in general I recommend separating your active data (that users need to access directly) from your historical data (that you keep mostly for reporting). Keep your active data in your Firebase Database, which is optimized for synchronizing data between users. Then keep your historical data in a separate data store that is optimized for reporting.

A quite common combination is to keep the historical data in BigQuery and then aggregate the data there. You can then write the aggregated data back to your Firebase Database, to make it available to your users.



来源:https://stackoverflow.com/questions/44920202/what-is-the-best-way-to-show-reports-with-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!