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 
 
Bic Files -> Database Entries?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Thu Dec 24, 2009 18:59    Post subject: No talking about that Reply with quote

Not talking about deleting Journal Entries via website, am talking about deleteing actual bic files via website interface.

Which is why a heartbeat is used for the database query.


The alternative is

Pseudo Heartbeat, OnEnter, OnExit, OnChat or something else not useful.

Eg

Database query at a semi-regular interval -> is there a bic file to delete.

If there is > Delete them via a Letoscript query.
if there is not > Do Nothing
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Dec 24, 2009 19:15    Post subject: Reply with quote

I see. If you would host website from same computer as nwn server it could be done via php, but i guess its not that case, right?

Well if you want it to be "invisible" for player (although i think its not need), then the heartbeat is the best choice indeed. Pseudo heartbeat is useless as it would run all the time module is up.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Thu Dec 24, 2009 19:34    Post subject: Not quite Reply with quote

Only way php could accomplish it, is if the nwn server directory, or at least the server vault itself, was hosted within the apache/php directory structure - while I do have php on the server that the nwn server is on, I am not prepared to expose the nwn server via a webserver.

The system I have at the moment, works on php cronjobs etc, allowing for players to cancel the deletion on their character if they have enough time.

eg - Web Server with php and mySQL > I want to delete my character

stores locally the delete request - every 10 minutes check for characters in the deletion queue if there are any - move them from web server php/mySQL to game server mySQL - game server mySQL is protected in that it ONLY accepts connections from my website server.


This means that if a player accidentally deletes the wrong character, they have up to 10 minutes to cancel - of course, if they time the delete request badly, they could have as little as a few seconds to cancel.

Pseudo Heartbeats wouldnt so much as run the whole time, they are cpu intensive which is why many servers regulate the amount of pseudo's operational at same time (Higher Ground for instance, regulate the amount of Storm of Vengeance spells in a single area via regulation of Pseudo Heartbeats)

However, Pseudo's can be programmed to only operate on specific criteria. Its just the triggering of one, which is the hard part. You need a starting point to kick it off.
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Fri Dec 25, 2009 1:25    Post subject: Reply with quote

Using SQL2008 I'm running a FileStream over my ServerVault.
With the addition of my CLR I get full 'class' access to the BIC - so can adjust the contents via NWNX.

but for the issue...
Archiving is done by taking a 'compressed copy' of the BIC (storing it in the database) and deleting the the File System file. --nothing gets permanently deleted
To recover I run a stored proc (CLR) which decompresses the BIC and saves it back to the file system.

A web interface could be used to kick-start a recovery.

-- without the fancy stuff. Stored Procs should have access to run O/S commands (if you let them). Import/Export of BLOB data is no biggie. Just set up your web stuff to run the stored proc.

I know this doesn't solve the 'space' issue, but a bigger disk will. Wink

Cheers
Gryphyn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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