logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Server Vault plugin (fast networked shared vault support)

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Sat Feb 04, 2012 21:26    Post subject: Server Vault plugin (fast networked shared vault support) Reply with quote

I'm announcing the release of the Server Vault plugin:

Binaries + debug symbols and documentation: http://www.nynaeve.net/Skywing/nwn2/xp_AuroraServerVault/AuroraServerVault.zip
Source code (requires NWN2 Datafile Accessor Library support libraries): http://valera-ext.nynaeve.net/~skywing/nwn2/AuroraServerVaultSrc.zip

*This plugin includes an updated release of xp_bugfix, 1.0.15, in the plugin package. xp_bugfix version 1.0.15 or higher is required to be installed for the server vault plugin to function, as it includes a new packet filtering hook that the server vault plugin requires.*

It is recommended that you instead install the latest version of xp_bugfix from the xp_bugfix distribution, and use that version instead of the xp_bugfix.dll prepackaged with the server vault plugin.

Detailed documentation is included in the readme, including deployment instructions. Users are strongly recommended to read the readme for this plugin.

This NWNX4 plugin is designed to enable multi-server game worlds to scale up to large numbers of servers while maintaining a centralized, shared server vault. Features include the ability to asynchronously transfer character files to and from a shared vault, over a high latency connection, without blocking the server during the transfer. This enables seamless use of a remote server vault without degrading performance on every character save, character load, or player login.

The plugin will work with any shared filesystem, such as SMB, NFS, etc. It is preferred that the filesystem implement file locking semantics; filesystems without locking semantics may require script-side support to manage concurrency. Most filesystems, such as SMB, provide locking and do not require extra support.

The server vault plugin works by maintaining a local "cache" of a centralized server vault network mount point. When a player logs in to a server, the player's login message is temporarily held back while the vault plugin makes the local vault cache current for the player's vault directory. Once the vault cache is current, the login message is allowed to be processed, and the character file is loaded from the local filesystem. Because the server is only allowed to process login messages when the local vault cache is up to date, the game server is not stopped waiting on network I/O at any time.

When a character save occurs, the server vault plugin allows the character save to write to the local cache, and then transfers the character file to a local "spool" directory. Then, the plugin asynchronously transfers the saved character file from the "spool" directory to the central vault, without blocking the server.

Should a server crash occur, or a disconnection from the central server vault occur, the plugin will continue to re-try character "spool" uploads in the background. A central server vault disconnection prevents new players from logging in, but does not disturb players already logged on to the server, whom can continue to play without data loss.

As an added protection against servers running out of disk space and corrupting character files, the server vault plugin will refuse to transfer a corrupted GFF (*.bic) file to the central vault store.

Please see the documentation included with the plugin for further details, including required configuration steps.

The plugin also provides several new script functional capabilities:

- Check if a character file (account\filename.bic) is pending upload in the spool: NWNXGetInt("SERVERVAULT", "CHECK SPOOL", FileName 0); /* Returns TRUE if the character file is still not fully transferred to the central vault. */

- Inhibit character saves for a character file (account\filename.bic): NWNXGetInt("SERVERVAULT", "SUPPRESS CHARACTER SAVE", FileName, 0); /* Ignore ALL future requests to save this file name until explicitly re-enabled. The save disablement state persists until explicitly cleared or the server restarts. */

- Re-enable character saves for a character file that had saves disabled by script request: NWNXGetInt("SERVERVAULT", "ENABLE CHARACTER SAVE", FileName, 0);


The disable character save and enable character save features can be used in conjuction with an external synchronization medium to compensate for filesystems that do not implement standard locking semantics. (Most network filesystems, such as SMB, do not have this limitation.)


Last edited by Skywing on Tue Feb 28, 2012 5:20; edited 6 times in total
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Sat Feb 04, 2012 21:37    Post subject: Reply with quote

After over a month of exhaustive beta testing, I am pleased to state that the server vault plugin now powers the transoceanic shared server vault in ALFA's multi-server game world architecture (in fully operational, production form).

As a result of ALFA's generous assistance in helping to test the server vault plugin, the initial release is fully production quality, and has been subjected to thorough testing and heavy use in a production environment. ALFA's assistance is gratefully appreciated and has been instrumental in coming to a stable and high quality release.
Back to top
View user's profile Send private message
Rokene



Joined: 06 Apr 2011
Posts: 10

PostPosted: Tue Feb 14, 2012 18:14    Post subject: Reply with quote

Wow, that's awesome. ^^
Back to top
View user's profile Send private message
pain



Joined: 30 Oct 2011
Posts: 16

PostPosted: Tue Feb 14, 2012 18:37    Post subject: Reply with quote

That is pretty sweet.

Can probably disable saves too while a character is wildshaped as a way to sidestep the bugs with that ( at least on servers where you are not worried about exploits )
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Wed Feb 15, 2012 9:12    Post subject: Reply with quote

Character save disable can be used in other circumstances as desired. For example, if you want to disconnect a player and not save their character file.
Back to top
View user's profile Send private message
Hialmar



Joined: 15 Jun 2005
Posts: 32

PostPosted: Thu May 10, 2012 14:15    Post subject: Reply with quote

Skywing, thanks again for letting us test this plugin.

Do you think it could be used with something like Skydrive as the shared vault storage ?

Or maybe Dropbox which has an API which could be used to allow locking management ?
Edit: there doesn't seem to be API calls to lock/unlock files with Dropbox so I suppose the locking would have to be done on the scripting side as you told in your documentation.
_________________
Hialmar, A Land Far Away Infrastructure Administrator
Back to top
View user's profile Send private message
Hialmar



Joined: 15 Jun 2005
Posts: 32

PostPosted: Thu May 10, 2012 14:52    Post subject: Reply with quote

Using skydrive's comments could maybe be used for file locking.
http://msdn.microsoft.com/en-us/library/live/hh826524

A comment containing a server id could be read and updated.
_________________
Hialmar, A Land Far Away Infrastructure Administrator
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group