Google drive bandwith concerns

More
3 months 2 weeks ago #3696 by zigtom
I was pretty pumped about using the google webservice but then i saw this in the docs:
However, if you game gets to have a high number of monthly players, contacting Google every single time the app is opened (could be several times a day) will consume too much bandwidth whenever the Spreadsheet changes. Even when Google allows using that bandwidth, it can flag your spreadsheet and even temporally disable it. Also, most users will not want the extra Internet request every time they open the game.


Do you have any datapoints on this? What constitutes a lot of monthly users? Any info about google buisness accounts or a way to pay to not have this as a problem?

An alternative is can we host our own data and just dump the CSV contents into an API call after we download it?

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #3697 by Frank
Hi,
With the latest updates that Google has pushed, bandwidth is no longer a issue. The real problem is that the WebService that is used to get access to the Spreadsheet without having to store the User/Pass in your game hasa daily time constraint.
Google allows a WebService script to run for no more than 90 min a day.

That's why its adviced to have the update frequency to DAILY, WEEKLY, etc. instead of ALWAYS.
That setting, determines when the plugin decides it has been long enough since the last check. But if the couta is exceeded and the plugin can't access google spreadsheet, then it will try to access it every time the game opens, until it can get access.

That means that if you make a change to the Spreadsheet, a batch of users will download it the first day, then another similar batch the day after, and so on, until everyone gets updated.

Said that, even with big spreadsheets, the time the WebService is ran to send the data is just a few milliseconds (for the app it can take seconds to download the data depending on your connection, but the webservice only runs for an small amount of time).
So, 90 min a day allows for several hundred thousands of users to download the update.

If you game needs faster updates and you are having several millions users, then hosting the CSV yourself maybe more convenient.

Here is an example script on how to download the CSV from your own hosting, and import it into the game at runtime:
inter-illusion.com/assets/I2Localization...portingaCSVfile.html

Please, notice that to avoid downloading the CSV everytime the game runs, you may want to also have another file that keeps the latest time the spreadsheet was updated. That way the game only needs to download that small manifest, and only get the big CSV file if it has changed.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #3699 by zigtom
Thanks frank! Based on what you said, a million users per day is fine for us. You may consider every other day which would be better then weekly because if there is an important change that needs t o go out, waiting a week for it is too much, but waiting 2 days is probably acceptable. Then you could double the # of users per day per google limits.

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #3700 by zigtom
Oh and just to confirm some cases
1) User is offline first time they use the game. It uses the data within the app itself
2) User is online at some point and gets updated text from the web service, then the next time they launch the game they are offline, it uses the saved values from the update, not back to the initial values?

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #3701 by Frank
I like that. Will add it to the next update

Thanks for the suggestion.
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #3702 by Frank
When the game is built, it has all the data in the I2Languages.asset.
If on the first time, the user is not online or the asset is up-to-date with the spreadsheet, then it will use the data in the asset.

If there is a change, the spreadsheet is downloaded and saved into a local file.

From that point on, if the user is Online or Offline, it will never use the data in the asset, instead, it will use the one from the cache (i.e. the downloaded file)

If later there is a new update, the local file is overritten with the new data.

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.173 seconds
Template by JoomlaShine