question

Dima avatar image
Dima asked

Best way to load a bunch of data on the start of the game? MongoDB support?

Hey guys,
we would like to load a bunch of data on the start of our game.
The way we actually do this is by loading a zip file from the File Management to the client, unpack it, read the contained json files and after reading them, deleting them since we need to load them fresh on every start.
This takes some time and we would like to make the whole process faster.

We would like to use title-data, but it doesn't allow us to store that much data and there seems to be no way to sort and categorize the title-data.

Since we're new to PlayFab (using it with corona) we aren't sure if this is the best way to do that.
In the past we've used "Coronium" which has also its kind of cloud script (called cloud code there).
With their cloud code we we're able to load a lot of data from MongoDB pretty fast.

We've seen that soon there will be a MongoDB support for PlayFab.
We think this would be perfect for us.

Can you give us an estimation on when the support for MongoDB will be available?
Or is there an other better way to load data?

Is there maybe a way to read multiple files from the File Management via Cloud Script and return the result to the client?
That would be even better than the MongoDB support.

Thank you in advance! :)
Dimitri

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

Sorry, but until something is in active development, we tend not to provide estimates. As a live service, our schedule can change on a moment's notice, and we don't want anyone to take a dependency on us for something we're not 100% certain we'll be delivering when we say we will.

Now that said, you can certainly use MongoDB, or any other database system that has a Web API, via Cloud Script right now, as the http functionality lets you make calls to external web services.

But that said, what are the specifics of the data - both the content and how it is used? In cases where the client needs all the data, the Content service is best, since that's a CDN and so the client will get the data from the closest possible source. When the client only needs part of the data (which sounds like the case here), we've had some titles embed their data as const info in the Cloud Script itself, in order to minimize the time needed to get the data to the client. Or, if a data table is definitely what's needed, you can use the http call to connect to mLab MongoDB, Azure Table Storage, AWS DynamoDB, etc. There's an example of this in the basic Cloud Script that is automatically loaded as revision 1 in all new titles ("makeHTTPRequest").

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.