(Thank you, Jeff Hobbs, for forwarding this post)

[Jeff Rogers]
>I have an app that was running on tclhttpd that I want to migrate to
>AOLserver.  For its small database needs it used mk4tcl
>(http://www.equi4.com/metakit/tcl.html).   So I'm stuck with the problem of
>figuring out how to use mk4tcl within AOLserver.  I realize there may be
>threading issues, its easy enough to take a heavy-handed approach and put a
>mutex around every operation.

Mk4tcl already does the mutex-wrap when compiled with threads enabled.

>I tried putting "load Mk4tcl.so" in a startup tcl file, figuring that any
>changed made to the interpreter at startup would be carried through to ADPs;
>it made the commands available within that file but not in subsequent
>requests.
>
>putting "load Mk4tcl.so" in every page seems to work, but it also seems like
>overkill.

Perhaps introduce an "interp alias" to tie all slave interps to the same
master doing the real work?  I'm not too familiar with threads, my
apologies if this is completely missing the mark.

>There is no ns_mk4tcl that I'm aware of, tho it probably wouldn't be
>difficult to write such.  Barring that (say I only had a loadable module and
>no source) would it be possible to write a ns_load_module module that would
>load something with the plain tcl module interface into aolserver?

One more comment to make, is that one can open a datafile with Mk4tcl
with the "-shared" option - in which case that db will be usable in all
interps.  This is an efficient way to access a single datafile from
multiple threads, and also a way to exchange data between threads (a db
need not be tied to a file).

Not being familiar with AOLserver, I welcome all tips and suggestions on
how to make Mk4tcl fit in better with that environment.

Regards,
Jean-Claude (now subscribed briefly to AOLSERVER list to follow up)

Reply via email to