Re: mysqltcl timeout



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.

.



Relevant Pages

  • Re: 2.6.19-rc3 system freezes when ripping with cdparanoia at ioctl(SG_IO)
    ... scsi_inquiryto identify the device and determine interface type. ... seems to be the first time to actually issue commands to the device. ... cdparanoia can handle both cases as long as the kernel ... Coincidentally I am sitting on a patch from Luben Tuikov ...
    (Linux-Kernel)
  • Re: A proposal - binary
    ... VMI into the paravirt_ops interface. ... it is important for me to educate everyone on that layer and find out the opinions people have on what an acceptable license / source policy is for that layer. ... We use it to indirect hypervisor calls so that they can be future compatible, instead of forcing a particular hypervisor interface. ... This layer is very much like a PAL code layer that allows system level instructions to have alternative implementations, and also, most importantly, means we are free to change the structural layout of information which is shared between the hypervisor and the kernel. ...
    (Linux-Kernel)
  • Re: 2.6.19-rc3 system freezes when ripping with cdparanoia at ioctl(SG_IO)
    ... machine with SATA/ata_piix and cdparanoia 3.10. ... scsi_inquiryto identify the device and determine interface type. ... seems to be the first time to actually issue commands to the device. ... cdparanoia can handle both cases as long as the kernel ...
    (Linux-Kernel)
  • Re: Question re Migration of VB6 App to .NET
    ... I've had the opportunity to advise folks on how to move VB6 to .Net in the ... Create an ENTIRELY NEW USER INTERFACE. ... business object layer was actually designed to be independent of the U/I ... Pick a relatively self-contained set of business objects. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Question re Migration of VB6 App to .NET
    ... I've had the opportunity to advise folks on how to move VB6 to .Net in the ... Create an ENTIRELY NEW USER INTERFACE. ... business object layer was actually designed to be independent of the U/I ... Pick a relatively self-contained set of business objects. ...
    (microsoft.public.dotnet.general)