Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3664) Server doesn't react while send_all_info(&pc
Home

[Freeciv-Dev] Re: (PR#3664) Server doesn't react while send_all_info(&pc

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#3664) Server doesn't react while send_all_info(&pconn->self);
From: "ue80@xxxxxxxxxxxxxxxxxxxxx" <ue80@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Mar 2003 11:21:45 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, Mar 10, 2003 at 10:59:17AM -0800, Vasco Alexandre da Silva Costa wrote:
> 
> On Mon, 10 Mar 2003, ue80@xxxxxxxxxxxxxxxxxxxxx wrote:
> > On Mon, Mar 10, 2003 at 08:23:59AM -0800, Raimar Falke wrote:
> > I don't know how flush_buffer really works but i think that it waits
> > until the all data is sended before going back.
> 
> It is probably flush_packets() which is blocking. This is necessary
> because sending the whole game state takes a lot of time during which the
> client does not respond fast enough because it is stuck doing updates or
> waiting for the data to arrive.

Blocking the new connection is ok. But is it necessary to block all
connections?
 
> If flush_packets() didn't exist that client would be disconnected, per the
> current code, and probably might never get to reconnect.

Yes it works but the connecting client nearly gets no information how
far he is in the reconnectionprocess.
 
> It is not really bad when playing with many players because the number of
> times flush_packets() is called has nothing to do with the number of
> players.

During the game the problems aren't too big, problem is when someone
with a really bad connection is connecting. Then the server "stops"
until the person is (re)connected.

> If you don't like this waiting time change the 'netwait' server variable.
> 
> 
> Why is this code like that in the first place? Sending the whole game data
> takes several hundreds of KB or even MB of data. Consider it: all the map,
> units and cities. Few people have fast enough connections for that.

Tried it out with my connection 5 secs for a 200x100 map. (No units)
 
> Since in Freeciv all clients must be synchronized we can't lose data.
> 
> We buffer unsent data but the fact is this stuff piles up. After 30
> minutes you are already in the region of 8 MB (per player).
> Server memory is not infinite. There is a point where we must give up and
> disconnect the lagging player. We have client response time and buffer
> size limits.

Can't the buffer send the data without blocking the other players?
 
> I realize this isn't a perfect solution but it is a vast improvement over
> the previous one before I got to change that code. I.e. blocking sockets
> where the server could block upto 30 minutes when a single player was on a
> really flaky connection.

With the current solution some players need > 1 minute to reconnect and
the usuall responsetime for an action in normal game is < 1 sec. People
don't like to wait + they want to know what happens. And they want to
see if they are the only people who have the problem or all. 

Think at least the chatline should work during the long reconnects from
some players.

Thomas
-- 
Thomas Strub  ***  eMail ue80@xxxxxxxxxxxxxxxxxxxxx
Wenn Du nicht programmieren kannst und Dir für Arbeit zu schade bist:
Werde Berater, Analyst oder organisiere Kongresse.



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