How much data is transferred with geofire set

回眸只為那壹抹淺笑 提交于 2019-12-12 01:29:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!