Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: CMA passes back control without reason (PR#1505)
Home

[Freeciv-Dev] Re: CMA passes back control without reason (PR#1505)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: CMA passes back control without reason (PR#1505)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 3 Jun 2002 18:56:53 +0200

On Mon, Jun 03, 2002 at 06:29:26PM +0200, Reinier Post wrote:
> On Mon, Jun 03, 2002 at 05:58:26PM +0200, Raimar Falke wrote:
> 
> > > Do attributes really contain information only the server can compute?
> > 
> > The server don't understand attributes. Attributes are calculated from
> > the client state.
> 
> OK.  (I know you designed it that way.)  Thank you for explaining.
> 
> > Let me draw the data flow (commands take other paths):
> >                             
> >   server state   -------> client state     ------>   attributes
> >   (some kind of          (a view of the              (depend on the 
> > previous 
> >    master state)          master state;               attributes value, on 
> >                           not just omissions          the client state and 
> > on 
> >                           but also different          time (i.e. it is 
> > concurrent))
> >                           values)
> > 
> > The server state is saved. Upon a reload the client state is
> > recalculated (easy). And also for all other actions we can expect that
> > the server and client states are synchronizes.
> > 
> > The easiest for client saved attributes is to freeze this chain, save
> > the server state in a savegame and the attributes in a file. This can
> > be done with some control packets as pointed out above. The attributes
> > will not leave the client in this scenario.
> 
> I am not quite sure what you mean by 'freeze this chain'.  The server
> can send a 'save attributes now' message to the client, with an ID of
> the savegame (as you pointed out, hostname+port+timestamp+turn is not
> good enough, but hostname+port+timestamp+turn+number-of-saves-this-turn
> will work I think).

A hash of the savegame file simpler and more robust.

> The drawback is that for many reloaded games the client will not have
> any attribute info in this case.

Harddisk space is cheap. So I don't see a problem retaining a lot of
attribute files which are some kb in size.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  (On the statement print "42 monkeys"+"1 snake"): BTW, both perl and Python
  get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when 
  the answer is clearly "41 monkeys and 1 fat snake".  
    -- Jim Fulton, 10 Aug 1999


[Prev in Thread] Current Thread [Next in Thread]