reload extension

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

Moderators: Lapo, Bax

ernivan
Posts: 59
Joined: 11 Aug 2010, 14:53

reload extension

Postby ernivan » 27 Aug 2010, 15:02

hi

how can reload an extension by custom server script ?

thanks
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 27 Aug 2010, 20:37

Hello,

Any reasons you want to do this? It's not a good practice to reload an extension during a production. Usually you do this in development environment.

You could enable <AutoReloadExtensions> in your zone. It will automatically reload your extension when you save any changes to it. Again, not recommended to leave this on in production.
Smartfox's forum is my daily newspaper.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 27 Aug 2010, 21:01

Humm really? I always leave it on. Any reason (performance wise) why we should turn AutoReloadExtensions off?

Sometimes during production some players find bugs that are so rare they can only be found in very specific situations. I find this tag extremely useful for me to fix these things in run time so the next time a game loads, it will be fixed.

PS: One thing I noticed with AutoReloadExtensions is messing around with the scheduler. Sometimes it reloads the task several times, causing it to run more then one time during each interval.
SELECT * FROM users WHERE clue > 0
0 rows returned.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 27 Aug 2010, 23:47

http://www.smartfoxserver.com/docs/inde ... s.htm#zone recommended to turn it off during production:

"You can decide which Zones should have their extension(s) reloaded as soon as they get modified.
This feature can be very useful during the development and testing phases however it is recommended to turn it off when in production."


Additionaly, Lapo specifically mentioned it in this post as well.

Would be nice to know why too :-)
Smartfox's forum is my daily newspaper.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 28 Aug 2010, 03:47

Interesting in deed. Yeah he never actually mentioned why hehe.

Well like I said, the only problem I had so far was messing up with the logic of scheduled tasks in the init method from the zone extension. Other then that, dynamic room extensions changes seem to work just fine, specially because they are reloaded upon each room creation (a game room in my case).

In my case in specific, since each extension has around 5-6k lines of code, its very handy for me to be able to fix server side bugs on the fly when a user reports it on my forum. Its virtually impossible for me to have a 100% bug free product for my clients right on release, so I always have these "open betas" =)

But for what is worth, every time I absolutely needs to update the zone extension I always boot up SFS from the server. Already had some cases where scheduled e-mails were sent 2-3 times or auction bids resulted in 2-3 wins before I figured my scheduler was going nuts.
SELECT * FROM users WHERE clue > 0

0 rows returned.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 3 guests