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 
 
VaultSTER question

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Leutian Kane



Joined: 20 Jul 2005
Posts: 6

PostPosted: Wed Jul 20, 2005 23:41    Post subject: VaultSTER question Reply with quote

ok here is my question, i run 2 server instances of the same module on 2 different boxes, well i run on on my home pc and my friend runs one on his PC he lives 150 miles away from me, now using Vaultster is there a way to just make it transfer the .BIC files between servers whent he server saves characters, IE every 15 min it exports all chars, it saves chars on rest and on client exit as well, so basicly i want it to copy the .bic files over to the other server on his machine, in all 4 instances just without portalling the player over to his server, so , in a nutshell here is what im asking

server saves char be it thru on rest, client exit, or auto save every 15 min of chars, bic file sent over to other server vault and vice versa, just no sending the player there as he will either still be logged into one instance or exiting.

so is this possible?


Also would it be possible to update the databases on both servers this way as well since we are both running mysql dbs and using Nwnx2 for connectivity?

Also in case you are wondering we're running nwnx2 2.5.1 and are both using the Windows versions of NWNX2 and NWserver
_________________
Owner/builder/DM /Admin Leutian Kane's Nordock CEP persistent world servers.
Back to top
View user's profile Send private message Visit poster's website
Leutian Kane



Joined: 20 Jul 2005
Posts: 6

PostPosted: Mon Jul 25, 2005 3:04    Post subject: Reply with quote

Any Input? its been 5 days since last post has anyone even read it?
_________________
Owner/builder/DM /Admin Leutian Kane's Nordock CEP persistent world servers.
Back to top
View user's profile Send private message Visit poster's website
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Mon Jul 25, 2005 4:33    Post subject: Reply with quote

I can't help with Vaultster bjut that is what its designed to do...

As for the MySQL databases you have two choices.

1) Direct connect server #2 to the database on server #1. Either Direct Connection (Need current versions of NWNX) or through ODBC. Both of them you would set the server as the remote instead of localhost.

2) Continue to use seperate databases and set them up for bi-directional database mirroring.

#1 would work best as long as your connections are decent speed. #2 would work best if you have slow connections between them but isn't completely real-time.. Check your MySQL docs on how to do #2...
Back to top
View user's profile Send private message
Leutian Kane



Joined: 20 Jul 2005
Posts: 6

PostPosted: Tue Aug 02, 2005 3:33    Post subject: Reply with quote

Acrodania wrote:
I can't help with Vaultster bjut that is what its designed to do...

As for the MySQL databases you have two choices.

1) Direct connect server #2 to the database on server #1. Either Direct Connection (Need current versions of NWNX) or through ODBC. Both of them you would set the server as the remote instead of localhost.

2) Continue to use seperate databases and set them up for bi-directional database mirroring.

#1 would work best as long as your connections are decent speed. #2 would work best if you have slow connections between them but isn't completely real-time.. Check your MySQL docs on how to do #2...


well we're both on 6mb or so broadband lines. but wouldnt # 1 be kind of counterproductive? or am i misunderstanding what you mean? because if server 1nh was connected to server 2's db and vice versa wouldnt they just be writing to each others db's rather than to their own and to each others ?

basicly what im wanting to do is this , set it up so when the server auto saves, the database is updated ie every 15 min or so it does an EXPORTALL chars
does the same in the on rest and on client exit events.

what i WANT it to do is when these 3 things happen on either server, the server vaults and the databases connect to each other and update the proper entries. thus making the server vaults and databases (mysql) shared. as far as vaultster is concerned, it does what i need it to do for vault chars, but i just wnat the portalling player to another server part removed , so that it just copies the bic file over to the other server rather than copying bic then sending player over. and when this happens id also like the database entries for that character to be updated.
_________________
Owner/builder/DM /Admin Leutian Kane's Nordock CEP persistent world servers.
Back to top
View user's profile Send private message Visit poster's website
Vladiat0r



Joined: 17 Jun 2005
Posts: 25

PostPosted: Tue Aug 02, 2005 4:19    Post subject: Reply with quote

I'm no expert and have never used Vaulster, but from looking at how it's done, it seems to me all you need to do to is comment out the ActivatePortal function in the NWN Script and setup replication of the DB.
MySQL replication: http://dev.mysql.com/doc/mysql/en/replication.html
Back to top
View user's profile Send private message
Leutian Kane



Joined: 20 Jul 2005
Posts: 6

PostPosted: Fri Aug 05, 2005 9:43    Post subject: Reply with quote

Vladiat0r wrote:
I'm no expert and have never used Vaulster, but from looking at how it's done, it seems to me all you need to do to is comment out the ActivatePortal function in the NWN Script and setup replication of the DB.
MySQL replication: http://dev.mysql.com/doc/mysql/en/replication.html


yeah you're right about the commenting out part i assume , so far i just have vaultster setup so portalling only happens via recall portals where the pc's choose to log out port to party leader or portal to whichever server their not on currently. this works great, we'll see about the commenting out part when i put the script in my onclient exit event and my on rest event
anyway as for mysql db replication, thats a bit complicated it would seem just to update entries as they occur in game. however most likely i will simply eliminate the need for a database in my second module soon enough because all its really needed for is quests, crafting skills and player states, and the only thing i will really need on my second module is player state tracking ie if their alive or dead onlogin past reset
so that should resolve the issue.
_________________
Owner/builder/DM /Admin Leutian Kane's Nordock CEP persistent world servers.
Back to top
View user's profile Send private message Visit poster's website
Vladiat0r



Joined: 17 Jun 2005
Posts: 25

PostPosted: Fri Aug 05, 2005 9:59    Post subject: Reply with quote

Yeah... instead of using a DB, you could also use a player item to store local variables and they would be transfered with the player .bic file.
Back to top
View user's profile Send private message
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Fri Aug 05, 2005 15:47    Post subject: Reply with quote

Leutian Kane wrote:


well we're both on 6mb or so broadband lines. but wouldnt # 1 be kind of counterproductive? or am i misunderstanding what you mean? because if server 1nh was connected to server 2's db and vice versa wouldnt they just be writing to each others db's rather than to their own and to each others ?


You are misunderstanding Smile What you are doing is setting ONE machine as the database server. The other machine points at it. Its the same idea as large websites use where you have several front end webservers and one database server in the background. Its easy to do and reliable as long as your connections are good. The drawback as compared to replicating between two instances of MySQL is that if the database server goes down BOTH go down. True replication can be a real pain to make work though.....

Item variables would also work but have one major disadvantage: You cannot edit the information outside of the NWN server like you can database entries.
Back to top
View user's profile Send private message
Leutian Kane



Joined: 20 Jul 2005
Posts: 6

PostPosted: Fri Aug 05, 2005 21:51    Post subject: Reply with quote

Acrodania wrote:
Leutian Kane wrote:


well we're both on 6mb or so broadband lines. but wouldnt # 1 be kind of counterproductive? or am i misunderstanding what you mean? because if server 1nh was connected to server 2's db and vice versa wouldnt they just be writing to each others db's rather than to their own and to each others ?


You are misunderstanding Smile What you are doing is setting ONE machine as the database server. The other machine points at it. Its the same idea as large websites use where you have several front end webservers and one database server in the background. Its easy to do and reliable as long as your connections are good. The drawback as compared to replicating between two instances of MySQL is that if the database server goes down BOTH go down. True replication can be a real pain to make work though.....

Item variables would also work but have one major disadvantage: You cannot edit the information outside of the NWN server like you can database entries.
well actually in this instance id probably need true replication, because both servers can be logged into autonomously so you could have char changes on one (slave) that wouldnt be reflectd in the other one(master) unless i set them both up as slave AND master. that would be about the only way i could think of to do it since they both must be able to update each other.

and as far as item variables is concerned, as i said the only real issue with the databases is for the quests and ATS crafting skills, well as long as i make it so there are no DB stored quests and crafting on the expansion im doing, then the rest is cake. because player states are easily transferred .
_________________
Owner/builder/DM /Admin Leutian Kane's Nordock CEP persistent world servers.
Back to top
View user's profile Send private message Visit poster's website
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Fri Aug 05, 2005 23:00    Post subject: Reply with quote

Leutian Kane wrote:

well actually in this instance id probably need true replication, because both servers can be logged into autonomously so you could have char changes on one (slave) that wouldnt be reflectd in the other one(master) unless i set them both up as slave AND master. that would be about the only way i could think of to do it since they both must be able to update each other.


Actually no you wouldn't need replication. Information from one server that is not effected by happenings on the other would be written into seperate tables in the main database (ie-Quests1 and Quests2 to hold quests for each server). Information that needs to be shared would be written into the same table (like current hit points, gold, etc). One database then handles both servers simultaniously. The MySQL server resides on ONE machine only, with both servers pointed at it.

Unless I completely mis-understand what you are saying Razz

It would look like this:

Code:


Server1(NWN) --------------------|
                                 |
MySQL Database(On Server1--------|-----Both servers connect to this database
                                 |
Server2(NWN Only)----------------|



Server1 has the MySQL database installled, Server2 doesn't. The NWNX.INI file for both machines is pointed at Server1.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion 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