www.ClassicTW.com
https://mail.black-squirrel.com/

Mail.dat file does anyone really need it?
https://mail.black-squirrel.com/viewtopic.php?f=14&t=18389
Page 1 of 2

Author:  Maniac [ Mon Jan 08, 2007 9:44 pm ]
Post subject: 

Question 1.
If the twmail.dat file gets too large does it really lag the server?

Question 2. What exactly is the purpose of that file ? I am gonna guess it is for people that are logged off and that's what you see when you log back on.

Question 3. If some one wrote an external program to clear the mail file every hour or so would that help with the lag without causing the server to lockup and or crash?

My idea would be to have an external program "buffer" the mail file by a fifo (first in first out) algorithm that would only hold the last X bytes/minutes thereby making the mail.dat file a finite size instead of always expanding....

Back of the envelope algorithm here.....
program scans game directories for twmail.dat
if size is greater than wanted..... read header and data....
delete start of data to desired size..... move rest of data to front of file.... write header and data and close file move on to next directory.

Or maybe something simpler.... just delete the twmail file every X amount of time and let the server recreate file.

I am fairly proficient in C# and or C/C++ and am confident I could come up with either solution if there would be a need and or want for something like this.

Author:  Runaway Proton [ Mon Jan 08, 2007 9:49 pm ]
Post subject: 

I believe the mail.dat file stores info on messages recieved if online or not. My experience is that if it gets to large, it doesn't affect the lag, but prevents people from logging in. If you delete this, you will miss messages generated by alien/player fig hits, cannon hits, and anything else that generates a message prior to the delete. I don't know if most players read this stuff if they log in to catch up, but you might miss a message that you've zapped another player with your canon while you were away.

Author:  Singularity [ Mon Jan 08, 2007 10:08 pm ]
Post subject: 

In a game full of aliens, nobody reads their mail. It's too painful and useless. In a game w/ fewer messages... ya, people read their msgs.

Personally I don't think fighits should be recorded as a msg. You can always run a comparison fig refresh and get the same data.

Problem is the file is locked, so you can't just delete it. It has an open handler... which would spell big trouble if you just go screwing with it.

Author:  Runaway Proton [ Mon Jan 08, 2007 10:18 pm ]
Post subject: 

Maybe the new TW version can have an option to turn off fig hits only in coms.

Author:  Vulcan [ Mon Jan 08, 2007 10:20 pm ]
Post subject: 

Runaway Proton wrote:
I believe the mail.dat file stores info on messages recieved if online or not. My experience is that if it gets to large, it doesn't affect the lag, but prevents people from logging in. If you delete this, you will miss messages generated by alien/player fig hits, cannon hits, and anything else that generates a message prior to the delete. I don't know if most players read this stuff if they log in to catch up, but you might miss a message that you've zapped another player with your canon while you were away.

Actually it will do both lag and lockout when it gets too big, and has to be trimmed perodically to keep it managable. Also the alien server will lock and lag the twgs as well but it is an easy fix, you can shut down the alien server while the TWGS is still running, and restart it, usually this fixes the problem, but sometimes it is necessary to shut the server down to fix things.

Author:  RexxCrow [ Mon Jan 08, 2007 10:20 pm ]
Post subject: 

The only way to do something like this, other then modifying the code internally would require the server to be taken off-line each time, right? (Which of course would cause more problems then it solves.)

Author:  the reverend [ Mon Jan 08, 2007 10:41 pm ]
Post subject: 

i like any solution that does not totally wipe the file very often. personally, my scripts read all that info and make good use of it for tracking and gridding.

Author:  Promethius [ Tue Jan 09, 2007 1:53 am ]
Post subject: 

It might be easier if players took it upon themselves to delete their messages. Usually two keystrokes, sometimes more will take care of all of them w/o having to look at them. I know this is asking a lot and I don't know if the messages are actually removed from the .dat file when we trash them.

Author:  Singularity [ Tue Jan 09, 2007 2:11 am ]
Post subject: 

Macro:
c    m    : y   q

Assign it, love it, use it. Problem I think are the players that are #SD#. Don't you still collect messages even with dead? I always seem to. In a big unlim alien game most of those guys aren't coming back just to delete their msgs.

Author:  Promethius [ Tue Jan 09, 2007 6:24 am ]
Post subject: 

Singularity wrote:
Macro:
c    m    : y   q

Assign it, love it, use it. Problem I think are the players that are #SD#. Don't you still collect messages even with dead? I always seem to. In a big unlim alien game most of those guys aren't coming back just to delete their msgs.


Good point

Author:  Thrawn [ Tue Jan 09, 2007 12:45 pm ]
Post subject: 

Promethius wrote:
It might be easier if players took it upon themselves to delete their messages. Usually two keystrokes, sometimes more will take care of all of them w/o having to look at them. I know this is asking a lot and I don't know if the messages are actually removed from the .dat file when we trash them.


They are removed.

Author:  Cerne [ Tue Jan 09, 2007 1:17 pm ]
Post subject: 

I just wish that there was a setting in CN where we could filter alien related messages so that they get tossed instead of recorded in the dat file. I want to see everything but alien messages.

Cern

Author:  RexxCrow [ Tue Jan 09, 2007 6:56 pm ]
Post subject: 

I had a brainstorming idea, I don't think it is really feasible but figured it was worth throwing out there at any rate. Is there a way to check through windows systems via (VBScript, JScript, or similar) if a file is open (if so tell it to close, if not in actual use at the time of the check) otherwise if it in being written to/read from, (have your script wait until it is free again) If that is possible then this idea could work so long as TWGS has a redundant type of check that ensure the file is open before trying to write to it, which may not even be necessary, as the source language may do this inherently anyway. Though problems may still arise if TWGS attempts to read/write, while the utility is cleaning up the file, unless TWGS first runs a check to ensure the file is available. Then the script would be used to interact with the utility or visa versa.

Author:  Thrawn [ Tue Jan 09, 2007 11:44 pm ]
Post subject: 

RexxCrow wrote:

I had a brainstorming idea, I don't think it is really feasible but figured it was worth throwing out there at any rate. Is there a way to check through windows systems via (VBScript, JScript, or similar) if a file is open (if so tell it to close, if not in actual use at the time of the check) otherwise if it in being written to/read from, (have your script wait until it is free again) If that is possible then this idea could work so long as TWGS has a redundant type of check that ensure the file is open before trying to write to it, which may not even be necessary, as the source language may do this inherently anyway. Though problems may still arise if TWGS attempts to read/write, while the utility is cleaning up the file, unless TWGS first runs a check to ensure the file is available. Then the script would be used to interact with the utility or visa versa.


The problem still resides in the fact that TWGS uses and accesses the mail.dat file. I can stop the Alien server, but it will still lock that file, especially if it's bloated. I can stop the server and keep TWGS up, and it can still be locked. No, it's better to stop completely. The trick is to keep the Aliens down. If you have to have a game with large races, keep the #'s to 5 or 10 per race. So far we've had no real issues. If someone says there is an issue, we display the 5 min warning and then delete the twmail.dat. Also I have it set now in the event of power outage, etc, the mail.dat gets deleted at any opportunity before the TWGS starts.

I have heard that the Alien messages may go into a different file than player mail for the next release, but that is just what I have heard. Otherwise, we live with the error and work around it.

Author:  Silence [ Wed Jan 10, 2007 1:41 am ]
Post subject: 

I think that making twgs recognize alien fig hits and player fig hits in different files would remove the problem, along with adding a cn feature to not record alien fig hits.

Seems the easiest way about it to me.

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/