question

brendan avatar image
brendan asked

Inventory management network efficiency

smartcarrion
started a topic on Mon, 24 November 2014 at 2:52 PM

Does playfab do any background network efficiency stuff for the item inventory? For example, if I call GetUserInventory, then buy something with PurchaseItem, will it add it to a cached copy of the inventory and not wait for the web response if i call GetUserInventory 1 second later?

I've been implementing a system to do this, just wondering if I'm wasting effort.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Best Answer
gwertzman said on Tue, 09 December 2014 at 8:04 AM

I believe our AngryBots sample does something like this today -- you can find some reference code in there. However you're right this is an optimization that would be good to solve for everyone -- we'll add it to the list of things we can consider implementing in the SDK to simplify your job.

meanwhile... if you're implementing a system for this... we would love to see what you've developed. We're always looking for problems that developers are solving that might be common across all developers, that we could look at embedding in the SDK or otherwise share as a library.


2 Comments
killamaaki said on Wed, 26 November 2014 at 11:42 PM

Well, checking locally stored data will always be faster than contacting a remote service over the network regardless of any kind of caching they might be doing.


gwertzman said on Tue, 09 December 2014 at 8:04 AM

I believe our AngryBots sample does something like this today -- you can find some reference code in there. However you're right this is an optimization that would be good to solve for everyone -- we'll add it to the list of things we can consider implementing in the SDK to simplify your job.

meanwhile... if you're implementing a system for this... we would love to see what you've developed. We're always looking for problems that developers are solving that might be common across all developers, that we could look at embedding in the SDK or otherwise share as a library.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.