Does using the .goOffline() and .goOnline() methods on a database instance establish a new connection each time or temporarily close/free and open connections? My concern is adding overhead costs (Protocol, SSL, etc).
1) if you connect to a database instance like so:
ref = Database.database("https://testapp-1234.firebaseio.com").reference()
2) then call a .goOffline() method on it
3) then again reference to the database later in the app like done in (1) will it establish a new connection? Is this an example of ...frequent, short connections? My concern coming from this Link
Further, is this even the right approach to stay connected to a database for as long as is necessary? Which then begs the question if .goOffline() method is even required to close a connection if there are no active listeners or pending write requests for the IOS SDK?
Firebase documentation for Android says:
On Android, Firebase automatically manages connection state to reduce bandwidth and battery usage. When a client has no active listeners, no pending write or onDisconnect operations, and is not explicitly disconnected by the goOffline method, Firebase closes the connection after 60 seconds of inactivity.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5c1e1250-0a50-4ddf-a56b-73464284300e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.