wesnothd re-work

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

wesnothd re-work

Post by Dave »

I've committed a hugely re-worked version of wesnothd to SVN. This contains a new, stripped-down, to the metal WML implementation which is much faster than the WML used in Wesnoth.

I haven't done a large-scale test of it yet (and indeed there may still be bugs to get worked out), but my small-scale tests indicate it is much faster.

I've also written a design document detailing many of the changes: http://www.wesnoth.org/wiki/WesnothdDesign

I'd like to get this tested thoroughly as the SVN server, and then if it proves successful be used to alleviate the problems we're having with the 1.4 server.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
vetgirig
Posts: 40
Joined: November 19th, 2003, 1:20 pm
Contact:

Re: wesnothd re-work

Post by vetgirig »

Think the document was clear to read if one knows programming.

One thing I would like to point out that its probably better to have N shards where N is a function of the number of games or users for it to scale gracefully. Dynamically allocation and creating new shards should not be a big problem I think.


So which are the server adress so I can test it out ? :-)
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: wesnothd re-work

Post by Dave »

vetgirig wrote: One thing I would like to point out that its probably better to have N shards where N is a function of the number of games or users for it to scale gracefully. Dynamically allocation and creating new shards should not be a big problem I think.
On the contrary, changing the number of shards dynamically would be rather complicated. You'd have to migrate sockets from one shard to another, and make sure they are synchronized as you do it. This would not be trivial at all.

Also, there is no need to do it. Just set the number of shards to an appropriate amount for the upper end of the number of users you want the server to support. It won't hurt anything much (except some extra memory usage and sleeping threads) when there are fewer users, and you'll get the benefits when there are many users.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
mowerpower
Posts: 41
Joined: December 17th, 2007, 12:38 pm
Location: Berlin, Alexanderplatz

Re: wesnothd re-work

Post by mowerpower »

What's the difference, more concretely, between regular WML and Simple_WML? Is it maybe something like the difference between postscript & pdf, where one can represent high-level document abstractions and the other stays close to what a printer will do with the document?
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: wesnothd re-work

Post by Sapient »

The term "simple_wml" is a bit misleading.

It's really a different (less flexible) version the config class which is optimized for a particular usage pattern (the wesnoth server). It avoids making unnecessary copies of strings and avoids unnecessary work on parsing unmodified content for output. On the downside, it has a more difficult syntax and could easily be used incorrectly. Also, when used in some different circumstances than intended, it could be less efficient than a normal config.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
mowerpower
Posts: 41
Joined: December 17th, 2007, 12:38 pm
Location: Berlin, Alexanderplatz

Re: wesnothd re-work

Post by mowerpower »

Sapient wrote:The term "simple_wml" is a bit misleading.

It's really a different (less flexible) version the config class which is optimized for a particular usage pattern (the wesnoth server). It avoids making unnecessary copies of strings and avoids unnecessary work on parsing unmodified content for output. On the downside, it has a more difficult syntax and could easily be used incorrectly. Also, when used in some different circumstances than intended, it could be less efficient than a normal config.
Ah, I see! Thanks.
User avatar
DEATH_is_undead
Posts: 960
Joined: March 4th, 2007, 3:00 pm
Location: Northern United States

Re: wesnothd re-work

Post by DEATH_is_undead »

Dave wrote:This contains a new, stripped-down, to the metal WML implementation which is much faster than the WML used in Wesnoth.
How much of the WML is changed?
Edit: i mean, are the changes internal in the engine, the way it reads it, or is this going to change the code as well?
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: wesnothd re-work

Post by Boucman »

some features (like preprocessor) that are part of the main WML, but are not used in client->server communication are not available to simple WML

this has no impact on WML authors
Fight key loggers: write some perl using vim
User avatar
DEATH_is_undead
Posts: 960
Joined: March 4th, 2007, 3:00 pm
Location: Northern United States

Re: wesnothd re-work

Post by DEATH_is_undead »

Boucman wrote:no impact on WML authors
Thats all I saw :D
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Post Reply