On 05.09.23 08:10, John at Decent wrote:
I think the best way is to have a naviserver module that implements a
“worker pool of processes”. The module would launch X numbers of this
external process (say, undroidwish), controlled via STDOUT/STDIN, and
dispatch requests free members of the pool, returning the result to
the caller. This would be an efficient way to have slow-loading Unix
processes brought into Naviserver efficiently.
The NaviServer module nsproxy does exactly this, i.e. running processes
in the background talking to NaviServer via pipes, providing queues,
cancellation, ..... The processes, which are executed via the nsproxy
module, are the "nsproxy-helpers", which are executing the incoming Tcl
commands and return the results back via pipe, such that for a caller,
it looks like a local "exec". The connection to the workers is
established via handles.
See [1] for an example, how nsproxy is used for implemented "exec" in
NaviServer, see [2] for the nsproxy API and configuration options.
-g
[1]
https://github.com/openacs/openacs-core/blob/oacs-5-10/packages/acs-tcl/tcl/proxy-procs.tcl
[2] https://naviserver.sourceforge.io/n/nsproxy/files/ns_proxy.html
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel