Page 1 of 1

reload extension

Posted: 27 Aug 2010, 15:02
by ernivan

how can reload an extension by custom server script ?


Posted: 27 Aug 2010, 20:37
by BigFIsh

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.

Posted: 27 Aug 2010, 21:01
by mistermind
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.

Posted: 27 Aug 2010, 23:47
by BigFIsh ... 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 :-)

Posted: 28 Aug 2010, 03:47
by mistermind
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.