是否有可能在Firebase中自动汇总数据 [英] Is it possible to automatically aggregate data in Firebase

查看:98
本文介绍了是否有可能在Firebase中自动汇总数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个集合,每个元素都有自己的计数器(一个数值)。 Firebase是否可以自动将这些数据聚合(减少)为单一值?

服务器端(即 firebase方面)答案是。如果你的应用程序更简单/不安全,你会做客户端..但我想不是这样的。
假设你的应用程序的数据是分散的和安全的,你通常在你的服务器(它本身就是一个firebase客户端)上进行计算,数据返回到firebase。

I have a collection where every element has its own counter (a numeric value). Is it possible for Firebase to automatically aggregate (reduce) this data into a single value?

解决方案

Server-side (ie. "firebase-side") the answer is no.
if your app is simpler/not-secured, you'd do that client side.. but I guess it's not the case.
Assuming your app's data is fragmented and secured, you'd normally do this calculation on your server (which is itself, a firebase-client), and push this piece of data back to firebase.

这篇关于是否有可能在Firebase中自动汇总数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆