Forum Games So much data made by Webservice Traffic

Discussion relating to game development with Unity

So much data made by Webservice Traffic

Postby jyk » March 10th, 2017, 6:22 pm

Our group has just made a game with Unity and using PlayerIO as our server. We find that we have 50Mb with data received, 50Mb with data sent and 8GB with Webservice Traffic. I wonder what contains in Webservice Traffic causing so much data and How can I reduce that?
jyk
Paid Member
 
Posts: 25
Joined: October 10th, 2016, 7:27 am

Re: So much data made by Webservice Traffic

Postby Henrik » March 11th, 2017, 10:58 pm

You can use the Api Sampler to figure out exactly what your game is doing:

https://playerio.com/news/11-new-feature-api-sampler
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: So much data made by Webservice Traffic

Postby jyk » March 13th, 2017, 7:54 am

I still can't solve the problem with the Api Sampler. Would you mind tell me what is in in Webservice Traffic?
jyk
Paid Member
 
Posts: 25
Joined: October 10th, 2016, 7:27 am

Re: So much data made by Webservice Traffic

Postby Henrik » March 13th, 2017, 8:40 am

Hey Jyk,

Webservice Traffic includes all the data that makes up any API requests and responses, for example BigDB saves, BigDB loads, Room joins, Authentication.

Typically, the majority of this data is related to BigDB, and I can see in your game that one day when you had gigabytes of webservice traffic, you also did 11 million BigDB loads. Even if each object is only 500 bytes large, that adds up to gigabytes quickly. You can check these numbers in the Resource Usage tab in the PlayerInsight section.

Another thing I did is that I checked the API Sampler in your game, and looked at errors. This showed me that your game was getting a lot of errors doing BigDB saves, because you are using optimistic locking, and were trying to save stale objects. It also showed me that your game was just stuck in a loop retrying the same save again and again, which means that you probably need to take a look at your error handling in your game.

What does your game do when it fails to do a BigDB save? You can look at the error code in the error handler and figure out the best way to move forward, if you're getting optimistic locking errors you probably need to load a fresh copy of the object before saving again, but you should also figure out why you have a stale copy of the object.
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm


Return to Games