AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Share vaultdata between servers (https://forums.alliedmods.net/showthread.php?t=84957)

Jon 02-03-2009 12:46

Share vaultdata between servers
 
I want a plugin to use the same vault datafile for multiple servers, possible?

Exolent[jNr] 02-03-2009 14:40

Re: Share vaultdata between servers
 
Use sockets and transfer the file between servers.

Jon 02-03-2009 15:05

Re: Share vaultdata between servers
 
Quote:

Originally Posted by Exolent[jNr] (Post 755119)
Use sockets and transfer the file between servers.

Arf, that can't be easy peasy. How?

Exolent[jNr] 02-03-2009 16:01

Re: Share vaultdata between servers
 
Take at look at this.
http://forums.alliedmods.net/showthread.php?t=80616

Jon 02-04-2009 11:36

Re: Share vaultdata between servers
 
As this is for a ps, would it be inefficent/use a lot of cpu to transfer the files every time a user disconnects?

Bugsy 02-04-2009 11:57

Re: Share vaultdata between servers
 
This is an interesting idea for a new plugin; Remote nvault access. I will try to put something together for you today while I'm bored at work and only have notepad to play with.

Jon 02-04-2009 13:21

Re: Share vaultdata between servers
 
Quote:

Originally Posted by Bugsy (Post 755611)
This is an interesting idea for a new plugin; Remote nvault access. I will try to put something together for you today while I'm bored at work and only have notepad to play with.

Sounds great m8

Bugsy 02-05-2009 01:27

Re: Share vaultdata between servers
 
Quote:

Originally Posted by Jon (Post 755670)
Sounds great m8

It would probably be best to implement this with UDP since it is faster. The problem is it is not as reliable as TCP. The advantage of UDP is it is a connection-less protocol; the server can send data to the client without first initiating a connection. I have never used UDP with AMX-X sockets so it will take some experimentation. I'm not sure how reliable this will be if multiple packets (nvault transactions) are sent at one time. I may need to have a queuing system on the receiving end.

Another issue that may make this impossible is 2 plugins simultaneously having the same nvault file open. I believe transactions are saved to the journal when the transactions are called in the script, they then get written to the actual vault file on nvault_close. I will have to look into the nvault module source to see if this will be a problem.

nikhilgupta345 07-22-2011 19:20

Re: Share vaultdata between servers
 
Bump.

Exolent[jNr] 07-22-2011 20:13

Re: Share vaultdata between servers
 
1 Attachment(s)
Here, try this plugin.

It requires the Server Comm API I made.

To set servers that share NVault data, add IP's (1 per line) in a file at:
addons/amxmodx/configs/remote_nvault_servers.ini

That file and code from plugin attached must be in all servers that will share the data.

Basically use the code from the attached plugin, and call the function nvault_remote_set() to send data.

If you understand it enough, you would be able to write any other nvault functions you might want to use like get/remove/etc.


All times are GMT -4. The time now is 01:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.