[英]How to tell whether my firebase node is used?
Firebase offers some overall Analytics in their App Dashboard, however, I need to know whether my stored data are ever used or they are just lying idly on a per node basis . Firebase在其App Dashboard中提供了一些总体分析,但是,我需要知道我使用的存储数据是否曾经使用过,还是只是闲散地躺在每个节点的基础上 。
Why? 为什么? It's simple: we are learning while developing, which makes the app a very fast evolving one.
很简单:我们在开发的同时正在学习,这使该应用程序迅速发展。 Not only the logic changes, but also the data stored need to be refactored from time to time.
不仅逻辑改变,而且存储数据也需要不时地重构。 I would like to get rid of abandoned and forgotten data.
我想摆脱废弃和遗忘的数据。 Any ideas?
有任何想法吗?
In best case, I would like to know this:
在最好的情况下,我想知道这一点:
- When was a node used last time?
上次使用节点是什么时候? (was it used at all?)
(是否使用过?)
- How many times was it used in 1h/24h/1w/1M?
在1h / 24h / 1w / 1M中使用了多少次?
- Differentiate between read/write operations
区分读/写操作
Cloud Functions trigger automatically and run on server. Cloud Functions自动触发并在服务器上运行。
https://firebase.google.com/docs/functions/ https://firebase.google.com/docs/functions/
https://howtofirebase.com/firebase-cloud-functions-753935e80323 https://howtofirebase.com/firebase-cloud-functions-753935e80323
So apparently the Firebase itself doesn't provide any of this. 因此,显然Firebase本身不提供任何此类功能。
The only way I can think of right now is to create wrappers for firebase query and write functions and either do the statistics in a client app or create a devoted node for storing the statistical data. 我现在唯一想到的方法是为Firebase查询和编写函数创建包装器,然后在客户端应用程序中进行统计,或者创建一个专用节点来存储统计数据。
In case of storing the data in firebase, the wrapper for writing functions ( set
, update
, push
, remove
, setWithPriority
) is relatively easy. 如果将数据存储在firebase中,则用于编写功能(
set
, update
, push
, remove
, setWithPriority
)的包装器相对容易。 The query functions ( on
, once
) will have to write in a successCallback
. 查询函数(
once
on
)将必须写入successCallback
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.