Search code examples
firebasefirebase-realtime-databasedata-transfergeofire

How much data is transferred with geofire set


How much data is transferred when I send the location to geofire table with geoFire.set("?????", [??.????, ??.????]) after the connection of the browser client has be set up?

We want to show a client with a fleet in public transport that it isn't really that much - but want to give facts. It would be nice to get the data every 5-10 seconds.


Solution

  • To see how much data is being transferred:

    • open the network tab of your browser
    • select the WS panel to just see web sockets
    • find the web socket that connects to your Firebase server
    • check the size of the frame that sets the value and the acknowledgement

    One example from the first GeoFire javascript sample:

    {"t":"d","d":{"r":2,"a":"m","b":{"p":"/-Kcj5Z0QMWqWaqO-3bUk","d":{"fish0":{".priority":"rmjhprs42j","g":"rmjhprs42j","l":[-16.130262,153.605347]}}}}}
    

    149 bytes