You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Massimo Manghi <ma...@unipr.it> on 2011/02/17 12:22:58 UTC

named interpreters output channel

Hi, 

last night I coded a named interpreters scheme that was easy to get done with
the goal I had in mind. I tested it creating 3 virtual hosts, each of them
bound to a different port (8080,8081,8082).

 It was easy to have an interpreter for each virtual host, but i found out
the rivet channel association to the interp was messed up and the output
of all virtual hosts goes to only one socket. 

I don't get all the details of this, but I think the problem is linked to 
the rigid interp-channel association made in Rivet_PerInterpInit. 
If I had looked carefully into the code I would have 
imagined it beforehand, but it was a way to learn something anyway.

If the analysis of the problem in correct it requires the creation of 2 new
components: a database of channels (created on the naming scheme and the
information in the server_addr_rec structure database which holds
the data for vhosts and ports), and a run time association mechanism that 
creates relations between the server_rec database and the channels database, 
depending on the naming scheme selected in configuration. 

At every request the association function would select the 'right' output
channel and it would plug it into the interpreter. 

 it should work, at the cost of a table look up at every request 
plus the cost of the association to the interp (Tcl_SetStdChannel), of
which I have no idea being ignorant about the precise implications within 
the Tcl I/O system.

comments are welcome. I wouldn't embark on this without a strong feeling
that this can improve our creature.

-- Massimo


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org