问题
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?
- Somekey is a unique id up to 5 digits?
- down to the 4th digit (gives us an accuracy of 11m according to Measuring accuracy of latitude and longitude)
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.
回答1:
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
来源:https://stackoverflow.com/questions/42180831/how-much-data-is-transferred-with-geofire-set