Forum BigDB receiving table in chunks

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

receiving table in chunks

Postby pragmascript » July 16th, 2011, 3:59 am

Hey,

I have a large table of GameObjects per level and want to send the gameObjects to a Player on connection.
But i don't want to send all GameObjects at once but send them in handy chunks of e.g. 100 objects each.
what would be the simplest way to do that?
pragmascript
 
Posts: 13
Joined: March 3rd, 2011, 12:20 am

Re: receiving table in chunks

Postby cjcenizal » July 16th, 2011, 9:23 pm

May I ask why 100-object chunks are useful to your situation?
cjcenizal
Paid Member
 
Posts: 115
Joined: March 29th, 2011, 12:31 am

Re: receiving table in chunks

Postby pragmascript » July 17th, 2011, 5:56 am

100 is just an example i'm happy with any reasonable sized chunk.

I can't load all data upfront because that's a few MB and would be too slow. I want to display the first part of the data immediately, so I don't bore ppl to death. (Also using chunks I could display a loading bar)
pragmascript
 
Posts: 13
Joined: March 3rd, 2011, 12:20 am

Re: receiving table in chunks

Postby cjcenizal » July 17th, 2011, 6:09 am

Well, you could use LoadKeys or LoadRange (http://playerio.com/documentation/refer ... erio.bigdb). I think creating an index that you can use to sort your data into chunks would be the way to go here.
cjcenizal
Paid Member
 
Posts: 115
Joined: March 29th, 2011, 12:31 am

Re: receiving table in chunks

Postby pragmascript » July 17th, 2011, 6:20 am

Thx for your answer :)

I will try that.
pragmascript
 
Posts: 13
Joined: March 3rd, 2011, 12:20 am


Return to BigDB



cron