Extensions vs Connection bridge. Which one is better?

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

Moderators: Lapo, Bax

User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Extensions vs Connection bridge. Which one is better?

Postby mistermind » 13 Nov 2008, 17:31

After using extensions to its fullest (using actionscript), I've realized it sorta slows the entire SFS down even if the server is at full speed. I don't know exactly if its my fault for making so many database connections (probably 4 or 5) in one extension call or just how it should behaive.
I then realized that sometimes using connection bridges rather then extension calls for that matter (flash->asp/php->database->flash) takes a very good load of SFS making it slightly faster.
I ask you: Am I doing something wrong on my extension calls or is it ment to behaive this way?
Should I change something on the config file? I've heard that changing <ExtHandlerThreads> could help out, but I'm still not sure if that is the cause of so much "general delay" on the whole game.
SELECT * FROM users WHERE clue > 0
0 rows returned.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 15 Nov 2008, 07:21

Database calls are quite slow compared to any other "regular" processing.
If each call to the database requires 200ms to complete, you will be able to execute a max of 5 requests/second containing a DB operation.

So, while I agree with you that there's a difference in performance between AS and Java, I think it is unlikely that AS is slowing down the server. The problem is likely to be in how you deal with slow calls such as frequent database access.

In order to better understand how this works you should learn more about the SFS threading model. This will help you to configure the server to handle those "slow calls" while keeping up with the rest of work.

All the details are found here -> http://www.smartfoxserver.com/docs/docP ... Safety.htm
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 41 guests