Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCP vs UDP



Philip Brown <philb@soda.berkeley.edu> writes:
> >>>>[From Tero Jyri Michael Pelander]
> 
>     > [I write..]
>     [ packet lost tcp ==> server resends ]
>     
>     [ what about missed update on map ]
> 
> No, it does NOT matter. You'll get another update in a split second.
> There's no benefit in getting repeated old information before the newer
> update you _really_ care about.
Well, that depends on your protocol.  Under the proposed protocol, of
which there is currently only one, you would send information like,
there is a monster @ 11,11. And if this monster never moves, then you
will never get another update on the monster.

> You want to move north. You hold down the "up" arrow.
>    client generates "move north" commands.
> You get to where you want to go.
> You let go the up arrow.  client stops generating "move north" commands.
This introduces the problem of how fast does the client generate move
north commands.  Conceptually, what *I* want is a move to the
following location command, not move n w n n w e e s w w.

> Actually, depending on how the protocol finally happens, it won't make a
> difference if we use UDP.
Except we will have to re-implement all the slow start stuff to keep
from overflowing slow and/or loaded links, we have to re-implement
guarenteed delivery stuff, etc. etc.

> Pressing the uparrow could generate a "keep going north" protocol request.
> releasing the uparrow could generate a "Stop going north" request.
> This would exactly mirror the response you might get with tcp, but
> with much less overhead.
Except there are problems with latency and lost packets.  What happens
when the stop going north request gets lost?  You don't have this
problem with tcp.

> Sound reasonable?
I personally think UDP would be a really big mistake.  We don't seem
to have a very coherent opinion of what the protocol should be like,
and I think it would be a really big mistake to try and implement
stuff over UDP unless there is some very clear benefit.
Overhead is not a clear benifit because over the slow links we keep
worrying about, the protocols usually do some sort of header
compression.  Furthermore, we lose a lot of work that already gone
into making tcp work well.
          -Eric 
*********************************************************
"It seemed like a good idea at the time"
           -The Mad Hatter
"Yes, you're very smart.  Shut up."
           -In "The Princess Bride"
*********************************************************