SFS thread

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

ndesy
Posts: 33
Joined: 18 Feb 2008, 21:41
Location: Montreal

SFS thread

Postby ndesy » 12 Sep 2008, 12:46

Hello all,

I have developed a bot engine to simulate heavy population on our application. It's small java app which open sockets to SFS in order to simulate the flash client. It's working fine. I have now been mandated to tranform the app into a SFS extension to have a single entity.

Now it's time to ask the question. Is there a restricted thread to dispatch event to the client or it can be done from any specific thread? I know SFS use a thread pool but I'm not sure if it's safe to communicate with my currently working extension from an external thread.

Thoughts?
orthiac
Posts: 115
Joined: 25 Jun 2008, 10:03
Location: Massachusetts, USA

Postby orthiac » 12 Sep 2008, 18:30

Not sure if it will work for you but as of SFS 1.6.3, you can simulate a user connection with the new createNPC method. Combine that with a scheduler and you may be able to do something all local to the Server.

Just a thought.
Menser
Posts: 111
Joined: 13 Nov 2007, 18:32

Postby Menser » 12 Sep 2008, 19:59

Heya-

Maybe its just me, maybe i misunderstand.

But wouldnt having this simulation app be an extension on the server adversely affect the results since the "fake client" is itself eating up some of the server apps cpu cycles?

like i said, maybe im crazy...

_-Menser-_
User avatar
Lapo
Site Admin
Posts: 21680
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 14 Sep 2008, 13:50

I have developed a bot engine to simulate heavy population on our application. It's small java app which open sockets to SFS in order to simulate the flash client. It's working fine. I have now been mandated to tranform the app into a SFS extension to have a single entity.

You could look into our Java API, they provide full access to all client side functionality --> http://www.smartfoxserver.com/labs/API/

Now it's time to ask the question. Is there a restricted thread to dispatch event to the client or it can be done from any specific thread? I know SFS use a thread pool but I'm not sure if it's safe to communicate with my currently working extension from an external thread.


I am not following. Are you talking about your (SFS) server side code?
If so, this document will clarify -> http://www.smartfoxserver.com/docs/docP ... Safety.htm
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 13 guests