Forum BigDB BigDB works faster on client

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

BigDB works faster on client

Postby FlashTeam » May 26th, 2011, 12:13 pm

Hi!

I have a prblem in performance of BigDB work. I work with players data.

When I load and save data in a client (using loadMyPlayerObject and save methods), it works fast.

But when I try to do it in a server (using GetPlayerObject and CreateObject/save methods), it works very slow (some seconds lag).

Is it ok or I make a mistake?
Flash can do it.
FlashTeam
 
Posts: 8
Joined: May 24th, 2010, 6:05 pm

Re: BigDB works faster on client

Postby Oliver » May 26th, 2011, 1:41 pm

The server and client methods for interacting with bigdb are exactly the same, so you'll only see a difference if you're located geographically different places around the globe.

For instance, if you're in europe, you're close to the bigdb main servers, while your serverside code might be running on servers in the us.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: BigDB works faster on client

Postby FlashTeam » May 26th, 2011, 1:48 pm

Thank you, it explains some lag.
But the difference is really big.
Can one method from US serverside to Europe DB has a lag about 1-2 seconds?
Flash can do it.
FlashTeam
 
Posts: 8
Joined: May 24th, 2010, 6:05 pm

Re: BigDB works faster on client

Postby Oliver » May 27th, 2011, 10:13 am

Where in the world are you located?

Remember, that if you're in europe, and are measuing time on the client you might be measureing:

Client -> Server (do the load) (europe to us)
Server -> Backend (load bigdbobject) (us to europe)
backend -> Server (here's the bigdbobject)(europe to us)
Server -> Client (i got the object) (us to europe)

All that being said: even 1 second is still high for this operation.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: BigDB works faster on client

Postby FlashTeam » May 27th, 2011, 10:21 am

I am in Europe part of Russia.
Flash can do it.
FlashTeam
 
Posts: 8
Joined: May 24th, 2010, 6:05 pm

Re: BigDB works faster on client

Postby FlashTeam » May 27th, 2011, 10:31 am

The operation getting data from db to client + save from client to db = about 0.3 seconds.
But when I do it via server part, it takes about 4 seconds. But when I do the second operation, I create and join the room specially for every user, maybe this operation is so long.
Flash can do it.
FlashTeam
 
Posts: 8
Joined: May 24th, 2010, 6:05 pm

Re: BigDB works faster on client

Postby Oliver » May 27th, 2011, 10:40 am

Creating and joining the room will also take a bunch of time.

Especially if it's the first room on a server, then the server also has to download the code.

-Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: BigDB works faster on client

Postby FlashTeam » May 27th, 2011, 12:01 pm

I tried to do it with not the first room - works a bit faster just...
Flash can do it.
FlashTeam
 
Posts: 8
Joined: May 24th, 2010, 6:05 pm

Re: BigDB works faster on client

Postby Oliver » May 27th, 2011, 12:37 pm

If you create the room first, this is what you'll be doing:

Client -> Backend (create a room)
Backend -> Client (here is the server where the room can be created)
Client -> Server (backend told me i could run a room here)
Server -> Client (yes, you're accepted)
Client -> Server (do the load) (europe to us)
Server -> Backend (load bigdbobject) (us to europe)
backend -> Server (here's the bigdbobject)(europe to us)
Server -> Client (i got the object) (us to europe)

So, quite a few steps.

Keep the connection to the room, and subsequent loads will be fast.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: BigDB works faster on client

Postby FlashTeam » May 27th, 2011, 12:56 pm

Thanks, Oliver!
Flash can do it.
FlashTeam
 
Posts: 8
Joined: May 24th, 2010, 6:05 pm


Return to BigDB



cron