On Saturday 09 November 2002 19:43, you wrote:

> Since the TCL core already has all this stuff in it about binding TCL
> vars to C vars, it seems plausible to use it for ns_shares and get
> 7.6-like performance without needing traces.

Ehm... the Tcl bindings *use* traces internally, i.e. on the C-level.
This is exactly what I wanted to do for tsv::share.
A very similar approach is already been deployed in the ns_share
implementation for the 8x series nsd.
I think this (trace-approach) would result in reasonable performance,
albeit not as fast as 7.6.

>
> I had to look at & halfway understand the ns_share changes to the TCL
> 7.6 core in order to fix the "malformed bucket chain" error.  I
> realize it's a hack to the TCL core, but it didn't seem that horrible
> for the benefits it yields.  It didn't seem like a bigger hack than
> the 8x trace implementation, though I understand that the 7.6 way
> is part of the core and the 8x way is independent of the core.

The 7.6 ns_share was a *deep* hack into the Tcl internals. It is
difficult to understand and maintain. Just look at all these locks arround!
Locks in one function, unlocks in other. Brrr... One gets lost pretty fast.
Benefits? I'd say, on the Tcl-level there would be no difference
between the ns_share and trace-enabled nsv_* (or the tsv::*).
Speed? Yes, I admit. it would be slower. But how much? Given the
skyrocketing CPU speeds, I'm more concerned about the implementation
maintainability then some-% speed penalty.

>
> We have lots of TCL code and lots of ns_shares on our site.  So aside
> from my philosophical dislike of nsv's, there's just too much code for
> us to change, both time-wise and risk-wise.

Is the "philosophical dislike" based on the Tcl-side of the matter
(i.e. need for wrapper commands) or the underlying implementation?


>
> IMO, an easy-to-use shared variable store is one of the greatest
> features of AOLServer.  ns_share, to me, is the right paradigm.  Maybe
> the TCL core guys can see their way to implementing an easy shared var
> mechanism that works like ns_share.  I can dream... :)
>

Well, who knows what future might bring ;)

>From my side, I will go an try the tsv::share command as described.
It should offer more/less the same on the Tcl-level as the ns_share.
Then we might do some performace tests, to see what happens really.
Again, I yet have to make some deeper thinking about the real
implementation. There may be a hidden catch-22 somewhere, who knows?


Cheers
Zoran

P.S. Ok, now I really have to go. I'll be back on Thursday. Bye.

Reply via email to