nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nel] TCP vs. UDP


From: Zane
Subject: Re: [Nel] TCP vs. UDP
Date: Thu, 5 Jul 2001 10:08:09 -0700

----- Original Message -----
From: "Vincent Archer" <address@hidden>
Sent: Thursday, July 05, 2001 8:50 AM


> To be efficient, any UDP-based protocol needs to be highly aware of the
> data semantics (not just syntax - i.e. format - but semantics - i.e.
meaning)
> of what it carries. Which makes it very complex and usage-specific; you
> cannot plug in a "random UDP protocol" in your app (in this case, the
> client-server part of NeL architecture). If you design the protocol in
> complete isolation of the application (the MMOG) inside, better go
directly
> to TCP; it won't be worse than anything you'll design. And it's already
> made and tested.

I don't believe that this is entirely true.  Let's look at what we need out
of a protocol for NeL:

1)  Know what data HAS to be delivered and what data doesn't really.
2)  Know what data can be overwritten by new data if we recieve a large
chunk of data
at once or out of order. (If the data is spread out, not read in one call to
the network object, then we don't need to know if it can be overwritten, and
in order  the game engine will overwrite it if it's the same class of data)

Problem one is very easy to solve, we simply use a priority argument when
sending data with our network object.  In this case high priority data could
be sent via TCP and low priority data could be sent via UDP.

Problem two really isn't all that hard to solve either.  Perhaps we have a
'class' argument whend sending data via our network object.  When a packet
is sent it includes it's data class and a serial number, both client and
server keep track of both.  When we recieve data we check the class and
serial number.  If the serial number is out of sequence and the data is
considered old for that class then it's discarded, otherwise it's accepted.
If the data has no class (class is set to 0) then all data is accepted and
the serial number isn't checked.

The only problem I see is mainting the large list of data classes.  Really I
don't think it's that much of a problem and wether or not you're using this
model if you do discarding of data you'll be doing class checking in some
form anyway.

I'm sure the rest of you will point out the many other flaws I don't see.
:P

-E.J. Wilburn
address@hidden




reply via email to

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