Hi,
In my server-side, I using in php files to save the data on the database.
I bought 100 users online license because my game got more popular.
Now, alot of users got bugs because of load the php files.
One user sends request to load his items while other user load it too, and the server-side confused and sends to the user information that do not belong to him, and the information belong to other user.
It happend also in login request, if user connect to the server while admin user connect, the server-side gives him the admin variables.
Link for my game: http://play-omega.com/
Sorry for my english..
AS Extensions problem
Re: AS Extensions problem
Hi,
I think it would be easier to directly call the database from your Extension code instead of delegating a web-server with PHP. This is because every HTTP call must run in a different thread and it also adds quite a bit of overhead in terms of latency etc...
Is there a specific reason why you can't directly talk to the database from your Extension avoiding the middle man? (i.e. the HTTP call toward the PHP server?)
Is your DB machine running in the same network with server running SmartFox?
Thanks
I think it would be easier to directly call the database from your Extension code instead of delegating a web-server with PHP. This is because every HTTP call must run in a different thread and it also adds quite a bit of overhead in terms of latency etc...
Is there a specific reason why you can't directly talk to the database from your Extension avoiding the middle man? (i.e. the HTTP call toward the PHP server?)
Is your DB machine running in the same network with server running SmartFox?
Thanks
Re: AS Extensions problem
Thanks for your reply,
I was used in PHP because I never knew about the database system on the server-side.
Now I know, and I know how to use it, but I have a lot of codes on PHP and I can't to change all my code.
Why did the server makes problems with this?
I was used in PHP because I never knew about the database system on the server-side.
Now I know, and I know how to use it, but I have a lot of codes on PHP and I can't to change all my code.
Why did the server makes problems with this?
Re: AS Extensions problem
I tried the database system and it very slowly. Is this just in my test server or it will be like that when I upload it on the server?
Re: AS Extensions problem
pichikala wrote:Thanks for your reply,
I was used in PHP because I never knew about the database system on the server-side.
Now I know, and I know how to use it, but I have a lot of codes on PHP and I can't to change all my code.
Why did the server makes problems with this?
The problem is that there is a lot of latency. You have to call a web server using HTTP which is slower than a direct socket connection, plus the HTTP server has to talk to the database which adds another layer of latency.
Re: AS Extensions problem
pichikala wrote:I tried the database system and it very slowly. Is this just in my test server or it will be like that when I upload it on the server?
When you say you "tried the database system" you mean you tried to connect from your Extension code?
What does it mean that it is slow? Did you measure the latency?
Also you didn't answer my previous question ---> Is your DB machine running in the same network with server running SmartFox?
thanks
Re: AS Extensions problem
Hi,
I mean I tried to connect from my Extension code.
When I said slow, I mean that the server reply after few sec.
My DB machine is running on my hosting server.
I mean I tried to connect from my Extension code.
When I said slow, I mean that the server reply after few sec.
My DB machine is running on my hosting server.
Re: AS Extensions problem
pichikala wrote:Hi,
I mean I tried to connect from my Extension code.
When I said slow, I mean that the server reply after few sec.
My DB machine is running on my hosting server.
What I am asking is if your SmartFox instance and database are running in the same network (or the same machine)
That's the only way in which you can obtain proper speed.
From the description of your problem it sounds like the two machines are communicating via the internet as opposed to a local network, which is the main cause of the latency.
Re: AS Extensions problem
Thank you Lapo!
I will try it.
I will try it.
Re: AS Extensions problem
Hi,
How can I make DB on my VPS?
How can I make DB on my VPS?
Re: AS Extensions problem
It really depends on the type of VPS and the database you need to install and it's pretty difficult for us to provide generic hosting help, as it is beyond the scope of our support forum.
Maybe the people at your hosting provider can install it for you, which I would recommend if you don't have experience with these things.
Thanks
Maybe the people at your hosting provider can install it for you, which I would recommend if you don't have experience with these things.
Thanks
Re: AS Extensions problem
Okay. Thank you very much for your quick responses!
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: Baidu [Spider] and 82 guests