Re: mysqltcl timeout
- From: yahalom <yahalome@xxxxxxxxx>
- Date: Wed, 22 Oct 2008 07:35:09 -0700 (PDT)
On Oct 22, 10:31 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On Oct 22, 3:24 pm, yahalom <yahal...@xxxxxxxxx> wrote:
On Oct 22, 9:04 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On Oct 22, 12:10 pm, yahalom <yahal...@xxxxxxxxx> wrote:
On Oct 21, 1:09 am, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
As a personal preference, and since the problem granularity seems to
allow it, I'd try processes: spawn a child process dedicated to doing
the blocking commands, and talk to it with I/O. Then [fileevent] for
its answers, and when you time out, kill it (or let it die at its own
pace if you can afford the extra database connections).
this sound very attractive but after trying this it looked like it is
more complex if you want little change to your code. my limitations
are:
1. I use itcl db layer to access the database.
2. I work with different databases.
what I tried is to change the itcl db layer so it will call the real
itcl db layer in a working process.
Then repositiion the boundary: encapsulate the whole itcl + db in one
process: this way you'll likely have a higher-level interface wit the
rest of your program, hence limiting the pipe bandwidth and parsing
complexity...
easier said that done :-)
As I said I do not want to change the application code (too much lines
of code). what I want is to have a dummy itcl layer similair to the
real one in API that will talk to the real layer via pipe. But how to
make an interface that when calling the dummy methods calls the real
methods is not clear to me.
What do you mean by "is not clear":
(a) that you wonder how to write it in Tcl
(b) that you are afraid of the complexity of the domain-specific
ramifications
?
If (a), we may help by showing idioms like deserializing arbitrary Tcl
values from a channel without explicit boundaries via [info complete].
If (b), what are we expected to do to help ?
I am not afraid of complexity if it works :-)
I am not sure about 'a'. for example [info complete] is new to me.
When I tried to make such interface work I got a mess due to the
commands and parameters being sent via the channel mixing together. so
I was not sure how to build a good interface that will allow each
command and paramters to be sent so they will be executed correctly in
the working process. an example or reference to an example of such
interface will be great. if there was a package that does such staff
it was even better.
.
- Follow-Ups:
- Re: mysqltcl timeout
- From: Alexandre Ferrieux
- Re: mysqltcl timeout
- References:
- mysqltcl timeout
- From: yahalom
- Re: mysqltcl timeout
- From: Alexandre Ferrieux
- Re: mysqltcl timeout
- From: yahalom
- Re: mysqltcl timeout
- From: Alexandre Ferrieux
- Re: mysqltcl timeout
- From: yahalom
- Re: mysqltcl timeout
- From: Alexandre Ferrieux
- mysqltcl timeout
- Prev by Date: Re: mysqltcl timeout
- Next by Date: Re: Using $args recursively
- Previous by thread: Re: mysqltcl timeout
- Next by thread: Re: mysqltcl timeout
- Index(es):
Relevant Pages
|