On 09.05.2008, at 20:00, Vlad Seryakov wrote:

>> Effectively, what I need is a upside-down of the
>> Tcl model: one interp any many threads.
>> Don't tell me: go shop Java. This does not compute
>> (for various unrelated reasons).
>
> You can use ns_job, you define how may Tcl interp/threads you may use
> and then just submit tasks, each task will get state and do the work.
>
>
> I guess you already explored that.

Yes. Won't work. I mean it _could_ but I need to program
for that _extra_. Ideally, I would start 10,100,1000 threads
each with its own small "universe" that actually contains
just dark matter (nothing) whereas all the good-stuff is
located centraly (a large mother-interpreter?).
Ideally, all the Tcl commands would be automagically executed
"in the mother" but have access to my "local" space (for
uplevel and upvar and friends).
>
> You may combine methods, like let one thread to handle several
> connections sequentially if that will work but i do not have exact
> details so i will stop now.

You can of course design a 1001 model that will work for the
particular case. What I need is a _generic_ scalable model
that will work always. Imagine a Tcl interp that costs nothing
to create and consumes just 5-10 KB virtual memory! Yet it has
"access" to (or "behaves" like) a full-blown beast that sourced
thousand+ files and loaded hundred+ extensions...

The blues that we are against is that we must source 1000s
and load 100s of things for each and every connection thread.
Given connection times are short, and one re-uses conn threads
all computes well. BUT.. in my case, connection times are long
(hours, days)... So, upside down. Hence a new methodology is
needed. I tried to reduce it to event-loop type, but this is
entirely different programing technique and will not work with
the code we already have.

I will have to digest this alone. If anything _generic_ comes
out of that I will give it away. But it is good at least to
express the idea here, in case somebody has some magic already
done up his sleeve :-)

Cheers
Zoran






-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to