Does Firebase have a timeout policy for write operations? -


there setvalue( ) save data firebase. happens if connection very slow. there timeout limit saving data? if timeout, retry? if retries, how many times?

also, there timeout reading method ondatachange(datasnapshot snapshot) , updating methods?

is there way set own timeout limits?

when client first connects firebase (so when executes first new firebase(...), establishes websocket connection server. after data transferred on pre-established connection.

when call setvalue() or write operation, command sent on open socket server. when client adds listener (with addvalueeventlistener() or similar), server send updates on open socket client. since there no connection being established, time-outs don't come play here.

when connection between client , server somehow lost, client try re-establish connection. uses exponential back-off here, tries reconnect , progressively less frequently.

while there no connection server, client keep serving data received in memory (or on-disk if you've enabled disk persistence) cache. write operations client queued sending server. local events (that trigger e.g. ondatachange() method) trigger right away, while client not connected server.

this covers lot of ground. if want learn more how works, best bet enable debug logging (firebase.getdefaultconfig().setloglevel(level.debug) in android client) , inspect appears in logging output when drop network connection. it's highly educational , answer more questions ever can here.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -