[ENet-discuss] Feeping creatures was: Re: ENet Util?

Lee Salzman enet-discuss@cubik.org
Sun, 9 Mar 2003 22:24:02 -0500


On Sun, Mar 09, 2003 at 12:18:16PM -0800, Brian Hook wrote:
> Just a thought here, but it might be nice to have an ENet utility 
> library that is separate from (and even downloaded separately) from 
> ENet that provides stuff that is often considered application level 
> yet which is common enough that code can be reused.
> 
> Generic delta compression is an obvious candidate.  Encryption is 
> less of a candidate because of the rather extensive design choices 
> necessary (asymmetric vs. symmetric, key exchange, key size, etc.).
> 
> I think big one though is serialization to byte streams which would 
> automatically handle endianess and alignment.  This includes 
> serialization of 16-bit, 32-bit and float quantities, along with 
> strings.  I think the API would be something like:
> 
> <snip>
>
> Brian
> 

    I can sympathize with why this is all useful, but I can't
help but wonder if this is the beginning of a slippery slope. As you
point out, a lot of things may not practically be called simple utilities
as there are a lot of design decisions involved in their use. Because
of this, I think the scope of such a utility library would be both too
big and too small. 

    You have a few little generic snippets of code in it, but then they're 
miniscule little snippets that could be reproduced with great ease by just 
about anyone. The harder stuff that wouldn't really fit in utility library 
is really the stuff that most deserves its own library. Even something
like serialization isn't so simple, as it effects the application-level
protocols quite a bit. Same deal with delta compression, as the
complexity is in determining what and where to apply it, not really in
the compression algorithm itself.

    I'm not against a utility library, it just needs a lot more fleshing
out, and maybe it's better off not being a utility library so much as a
higher level networking library over ENet.

    Lee