我可以使用Firebase Cloud Messaging在每次云存储更改时向客户端发送通知,提示客户端从云中读取以更新本地数据库吗?
有没有其他更有效的方法来确保两者始终同步?
发布于 2021-05-17 06:53:30
可以,可以通过云存储触发器实现。full documentation is here,但总体思路是:
每当云存储文件更新时,
收到此通知后会执行操作
该文档包含如何以多种语言编写和部署触发器函数的示例。最有可能的情况是,您希望函数在google.storage.object.finalize事件上触发:
Trigger type value: google.storage.object.finalize
This event is sent when a new object is created (or an existing object
is overwritten, and a new generation of that object is created) in the
bucket.https://stackoverflow.com/questions/67560781
复制相似问题