Handle UserVaraiable change at server side

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
vtween
Posts: 36
Joined: 26 Jul 2007, 17:31

Handle UserVaraiable change at server side

Post by vtween »

Hi,

I have built a virtual world using your platform.
http://www.ekoloko.com

We have around 200,000 registered users and over 2000 concurrent users at peak time.

First I'd like to thank you for your implementation and support.

I use user variables to keep the live data of the users.
Some vars like user position are changed at the client side and others by the server.
I want to limit the variables change by users only to the ones I allow to change and block others form client change.

I could not find an API allowing me to handle user variable change at server side before broadcast.
Of course I handle the server side using JAVA extension.

Your help is appreciated.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hi,
I want to limit the variables change by users only to the ones I allow to change and block others form client change.
You should perform the User Variable updates from server side.
Your client should call your server side extension requiring the variables update and passing any data that your custom code will validate before completing the process, refusing the clients that don't have permissions.
Lapo
--
gotoAndPlay()
...addicted to flash games
vtween
Posts: 36
Joined: 26 Jul 2007, 17:31

Post by vtween »

Thanks for the reply.

It is true that I can always Zone Extension as i do in many cases.
However this solution is a bit problematic since my Extension Handler threads are very busy.
Loading them with more load (user position is quiet a load) while the system handler threads are idle is a pitty.

Is there a hook where I can handle cilent user vars change?

Many thanks.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

However this solution is a bit problematic since my Extension Handler threads are very busy.
You can always add more if it's a matter of parallel processing. If not it won't help.

What I mean is that if your server side code performs long running operations (like http calls, db queries etc...) it is recommendable to add more threads for better scalability.
On the contrary if your code performs heavy computation adding more threads won't any good.

In that case you can try optimizing the code or move to a more powerful hardware.
Lapo
--
gotoAndPlay()
...addicted to flash games
vtween
Posts: 36
Joined: 26 Jul 2007, 17:31

Post by vtween »

Thanks
Post Reply