Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: packet batches? (was: [Patch] Making city report list
Home

[Freeciv-Dev] Re: packet batches? (was: [Patch] Making city report list

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: packet batches? (was: [Patch] Making city report list faster)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 10 Jun 2002 21:28:27 +0200

On Mon, Jun 10, 2002 at 09:08:52PM +0200, Reinier Post wrote:
> > It is indeed possible for a faster client (faster means here faster to
> > push requests into the incoming socket buffer of the server) to get
> > more requests executed per "cycle".
> 
> Being on a faster connection is not really "cheating".  But of course
> the server can always pretend that packets actually arrived separated
> by some delay, or something.
> 
> As I said, I don't understand TCP/IP very well.  Perhaps even on
> slow connections, a batch of packets sent at the same time
> will usually arrive at the same time.  In case of transmission
> errors, packets will be clustered *more*, not less.
> 
> If I understand correctly, the output is a bigger issue.
> I don't think the send_packet_() calls can block, but the server
> sometimes sends flush_packets(), and that may cause incoming packets
> to queue up.
> 
> > Another thing which is unfair (at least theoretical) is that the
> > connections are scanned in a fixed way. So if you got a low index in
> > the connections array your requests are always execute before the
> > requests of another player. But this only matters if the server gets
> > more than one request from all player in one cycle.
> 
> This can be fixed by using shuffled_player().

Or execute one packet at a time.

With loopback and clean CVS code all the ChangeAll packets arrive at
the same time at the server.

You may want to test this with the attached patch and a slower
connection.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Premature optimization is the root of all evil."
    -- D. E. Knuth in "Structured Programming with go to Statements"

Attachment: diff
Description: Text document


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