forcedotcom / quiz-player-app

Multiplayer quiz app built on Salesforce technology (player app)
Creative Commons Zero v1.0 Universal
13 stars 31 forks source link

Delay on questions to display on the devices #35

Open geezeuz opened 3 years ago

geezeuz commented 3 years ago

Summary

There is a delay while loading a new question, users only see a message that the next question is loading while the timer is almost finished and they are unable to pick an option. This happens with 2 o 3 questions each session of 25 questions.

App Version

Host app version (see bottom of host game page): v2.6.0

Player app version (see bottom of the player registration page): v2.1.0

Steps To Reproduce:

  1. Create Quiz_Question__c records
  2. Create a Quiz_Session__c
  3. Scan QR code with my phone and start a new session
  4. Get some questions

Expected result

Smoth transition between each question and the next one.

Actual result

A delay is experienced when users are waiting for questions to load, sometimes it takes 5 seconds or sometimes it takes the complete timer or 15 seconds. So users are not able to pick an option.

Additional information

This behavior happens to me when I was the only one in the session as well as with the max number of users (15), I've played with.

pozil commented 3 years ago

Hi @hernandezjesus, unfortunately this is a know issue related to network latency and there's not much we can do to address this.

The game relies on real-time WebSocket events to switch between game phases such as when a question is triggered by the game host and sent to all players. Network speed between the server and clients (the players) is particularly important for a good experience but there are two key aspects that can impact it:

  1. The player's region

    Heroku's free tier only has two data centers (regions): one in North America and one in Europe. The further away the players are from the data center the more lag they suffer.

  2. The network type & provider

    We've noticed big latency discrepancies between players operating on different kind of networks: wifi or mobile service vendors (there could be several seconds of latency between different vendors).