Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:708] Re: [VANILLA-L:707] 2 servers, 1 set of files?



Bob Tanner wrote:
> Any chance that 2 servers could be run using 1 set of files?

No.  Here's why.

Although .players is accessed in a shared-process manner, such that
updates can be made to it by multiple concurrent ntserv processes, the
.global file is not updated in this manner.

.global is written by save_planets in daemonII.c, on daemon exit and
every 3000 updates ... i.e. every five minutes.  The file is simply
overwritten.

.global and .players go together, in that the statistics and rank
generated depend on both sets of data.

A modification to allow shared access would require a revision to
save_planets that will add in the changes rather than write them out. 
This part of the function would also require access synchronisation to
ensure that the other server didn't do it at the same time.

The code currently will overwrite a player stats entry on file if a
player is using the same name for two ships.  The latest death is
written to the stats entry.  So if the same name was used on both
servers, data would be lost.

While you are at it, perhaps there should be a "Transwarp to next
galaxy" option, which will move you from one server to the other.  ;-)

-- 
James Cameron                                    (cameron@stl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800
+
++ Vanilla-l Mailing List ++
To unsubscribe: send "unsubscribe vanilla-l" to majordomo@real-time.com
For more information: http://archives.real-time.com


Follow-Ups: References: