Forum BigDB Get all objects of a table

Discussion and help relating to the PlayerIO database solution, BigDB.

Get all objects of a table

Postby romeoordos » November 15th, 2013, 11:07 am

Hi.

Is there a way to fetch all objects from a table or at least get a list of all keys in that table?
I don't see such methods in documentation and don't know if LoadRange supports fetching of ~500.000 objects in one request.

Thanks.
romeoordos
Paid Member
 
Posts: 9
Joined: July 27th, 2013, 10:42 am

Re: Get all objects of a table

Postby robscherer123 » November 15th, 2013, 4:27 pm

As far as I know I don't believe this is possible. I think you can only load 1,000 at a time.

You MAY be able to make something that loads 1000, and once that's complete, loads the next 1,000, and so on. Although you MAY get some kind of error if you continually load an insane amount of objects in a very short period of time.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Get all objects of a table

Postby Henrik » November 15th, 2013, 5:34 pm

What's the usecase for fetching 500000 objects? That's a lot of bandwidth that's going to be used for that?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Get all objects of a table

Postby romeoordos » November 16th, 2013, 1:02 pm

You MAY be able to make something that loads 1000, and once that's complete, loads the next 1,000, and so on

How can I know what object was the last one and what range I need to fetch next?

What's the usecase for fetching 500000 objects? That's a lot of bandwidth that's going to be used for that?

In first message I forgot to mention that we need that to do only once and manualy. This functionality is not needed for client.

We going to update our game and new version's object scheme is incompatible with previous one. So when update will be ready we need to shutdown game server, fetch all objects, update them and start game server with new updated client.

We have lot of accounts: ~500k. So that's the reason why we need to get so large amount of data.
romeoordos
Paid Member
 
Posts: 9
Joined: July 27th, 2013, 10:42 am

Re: Get all objects of a table

Postby Henrik » November 17th, 2013, 5:33 am

romeoordos wrote:We going to update our game and new version's object scheme is incompatible with previous one. So when update will be ready we need to shutdown game server, fetch all objects, update them and start game server with new updated client.

A better solution is probably to upgrade those object lazily, i.e. when you load each object in the game you check the "version" of the object using some property. If it's old, do that update thing, bump the version, and continue as before.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Get all objects of a table

Postby groomi » November 19th, 2013, 1:43 pm

Is there not an argument for having a method to batch edit all objects in a table from the admin console? I bet it would be trivial to implement and would have saved me some headaches in the past
groomi
Paid Member
 
Posts: 46
Joined: January 15th, 2013, 5:14 pm


Return to BigDB



cron