Surendar
Surendar

Reputation: 279

How does the Firebase Value event listener works?

If I'm using firebase value event listener for real time database, will it continuously query in a specific interval time from the app? If yes what is that interval time?

Will it increase my bandwidth consumption (considering my data is not changed in my database)?

Of course I can use single event listener, but just trying to understand firebase syncing process

Upvotes: 2

Views: 252

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

A listener doesn't poll by making a request repeatedly - it just listens to updates that are pushed to it from the server over a websocket that the SDK keeps open.

Every update to data being listened to will increase the total amount of data transferred over the socket. If the data at the location of the listener doesn't change over time, there is no additional data sent.

Upvotes: 3

Related Questions