Raised This Month: $ Target: $400
 0% 

Share vaultdata between servers


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jon
Veteran Member
Join Date: Dec 2007
Old 02-03-2009 , 12:46   Share vaultdata between servers
Reply With Quote #1

I want a plugin to use the same vault datafile for multiple servers, possible?
Jon is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-03-2009 , 14:40   Re: Share vaultdata between servers
Reply With Quote #2

Use sockets and transfer the file between servers.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 02-03-2009 , 15:05   Re: Share vaultdata between servers
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
Use sockets and transfer the file between servers.
Arf, that can't be easy peasy. How?
Jon is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-03-2009 , 16:01   Re: Share vaultdata between servers
Reply With Quote #4

Take at look at this.
http://forums.alliedmods.net/showthread.php?t=80616
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 02-04-2009 , 11:36   Re: Share vaultdata between servers
Reply With Quote #5

As this is for a ps, would it be inefficent/use a lot of cpu to transfer the files every time a user disconnects?
Jon is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-04-2009 , 11:57   Re: Share vaultdata between servers
Reply With Quote #6

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.
__________________
Bugsy is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 02-04-2009 , 13:21   Re: Share vaultdata between servers
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
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
Jon is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-05-2009 , 01:27   Re: Share vaultdata between servers
Reply With Quote #8

Quote:
Originally Posted by Jon View Post
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.
__________________

Last edited by Bugsy; 02-05-2009 at 01:32.
Bugsy is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-22-2011 , 19:20   Re: Share vaultdata between servers
Reply With Quote #9

Bump.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-22-2011 , 20:13   Re: Share vaultdata between servers
Reply With Quote #10

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.
Attached Files
File Type: sma Get Plugin or Get Source (remote_nvault_example.sma - 562 views - 1.8 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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