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

Re: New type of queue



So, it is interesting to compare two approaches:  this NewRED, and
SemanticRED (in the distribution)

> From: Rob <[email protected]>
> Date: Wed, 22 Apr 1998 11:43:44 EDT

> I did a similar thing with a new queue:   i did the following .... hope it helps
> ::
> 
> ns-compat.tcl:
> 
> set queueMap_(newred) NewRED

As I indicated earlier, you do not need to add or otherwise
change ns-compat.tcl.  It is for compatibility with earlier 
releases of ns.

Apart from that, your approach you have works, and works well.
However, it implies that NewRED is a different form of RED,
and works as an alternative to RED.  If this was the intent, 
this is perfect.

If however, you wanted to use the basic RED queues, with some
minor modifications, then, from an OO principle, you might want
to reuse as much of the RED code as possible.  In that case, I
would argue that the semanticRED type of coding is more appropriate.

As always, YMMV, since the type of code style depends on the
individual user and their needs, and ns appears flexible enough
to permit $n$ equally correct variants :-)


Kannan

--
[email protected]
http://www.isi.edu/~kannan