Firebase如何与Node JS脱机工作? [英] How does firebase workes offline with node js?

查看:47
本文介绍了Firebase如何与Node JS脱机工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Node.js有点陌生,并且正在使用Fire Base应用程序.我想制作一个可以离线使用Fire Base的应用程序

I am bit new to nodejs and working on with a fire base application.I want to make application such that it could work with fire base off-line also

我试图寻找一个相关的答案,我们究竟如何进行更改,以使Fire base可以脱机使用nodejs技术,而脱机似乎可以与nodejs脱机

I tried to search for a relevant answer How exactly can we make changes such that fire base can work off-line with nodejs technology it does seems to work off-line with nodejs

预先感谢

推荐答案

所有Firebase SDK都会处理间歇性的连接丢失:它们将数据保留在内存中,并且当与后端的连接恢复时,它们将发送所有待处理的写入并更新本地缓存.

All Firebase SDKs handle intermittent connectivity loss: they keep the data in memory and when the connection to the back-end is restored, they send any pending writes and update the local cache.

iOS和Android的Firebase SDK也支持磁盘持久性.这意味着他们将最近下载的数据(和挂起的写入)写入磁盘,并在应用程序重新启动时从那里重新读取它们.

The Firebase SDKs for iOS and Android also support disk persistence. This means they write recently downloaded data (and pending writes) to disk, and re-read them from there when the app restarts.

JavaScript客户端(包括用于Node.js的Admin SDK)仅支持间歇性的连接丢失.他们没有基于磁盘的持久性机制,尽管有人正在为此进行努力,因为该SDK是开源的.

JavaScript clients (including the Admin SDK for Node.js) only support the intermittent connectivity loss. They don't have a disk based persistence mechanism, although somebody is working on it now that the SDK is open-sourced.

另请参阅:重新连接后,Firebase JavaScript API是否会赶上服务器

这篇关于Firebase如何与Node JS脱机工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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