pubnub calculate publish latencies -


i'd calculate pubnub publish latencies pubnub clients before begin publishing. there preferred way to pubnub?

to make use case more clear, im trying synchronize clients, , these clients not need synchronized @ wall-clock time, since global. hence this solution, wouldnt necessary in case (but did point me in right direction)

so still obtain per-client latency calculation based on above link, that's fetching timestoken using time api. relevant above use-case depended on clients syncing particular wall-clock time, hence time-token anyways required fetched

however in case dont need timetoken. clients can synced using simple wait (k - latency) interval k constant clients .

therefore while can use timetoken method of calculating latency, prefer know actual publish latencies (unless there no vast difference between two)

here steps worked out myself determine latency publish

  1. determine local time (in milliseconds): start = now()
  2. client sends out message payload[ {"type" = "latencycheck"}, {"me" = "mypubnubuuid" }]
  3. when client receives message of above signature own id, sets variable end = now()
  4. latency send message , receive : end - start

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -