2026/07/30

From WoozleCodes
< 2026 | 07
Jump to navigation Jump to search
Thursday, July 30, 2026 (#211)
Wednesday Thursday Friday

References

Main Work

Ferreteria FileSys stuff in order to support sftp in FTM -- refactoring is mostly done, but ended up breaking DBA, so now I'm fixing those subsystems againN.

The immediate problem is that when I was changing the stream-objects in IO\Aspect\Connx\run\Session\Remote\SSH2 from functions to properties, I noticed that ::IsRunning() was passing stream_select() process-resource-arrays instead of stream resource-arrays. After remedying that, I now get a "No stream arrays were passed" error, so I'm trying to figure out what's going on and how this situation should be handled.

This in turn has led to a bit of a rabbit-hole in trying to reconcile IO\Aspect\Connx\run\Session\Local\proc\Pipes, IO\Aspect\Connx\aux\A\Pool, and IO\Aspect\Connx\aux\A\Canals.

  • Pipes is just a Pool with some proc_open()-specific stuff added. It's used by:
    • IO\Aspect\Connx\run\Session\Local\Proc
    • IO\Aspect\Connx\run\Starter\ops\OpCmd\Proc
  • Canals is an array of Stream-pairs (a lecturer and a listener, aka a Canal), with the trio on each side roughly corresponding to the trio in Pipes.
  • SSH2, meanwhile, also has a trio of Streams, but manages them itself rather than using Pipes – though it does use Canals for managing pairs.

Differences between how SSH2 and Pipes each handle their respective stream-trios:

what SSH2 Pipes
names:
  • OExecLecture
  • OExecRespond
  • OExecErrsBin
  • ProcIStream
  • ProcOStream
  • ProcEStream
functions:
  • CanalSetup() (also involves QOApp*)
  • IsRunning()
  • Pool::Block()
  • Pool::Shut()
  • Pool::CountOpen()

Now I have to remind myself: what are the QOApp* properties? Where do they come from?

  • They are defined and created in IO\Aspect\Connx\run\Session (same as the OExec* properties)
  • CanalSetup() in IO\Aspect\Connx\run\Session\Local\Proc looks very similar to the one in IO\Aspect\Connx\run\Session\Remote\SSH2 -- duplicate functionality? Should this be in a Core class?
  • The object-values are apparently set by external code, e.g. Sys\Data\Engine\aux\Schema\MyMar::ExportToStream(), Sys\Data\Engine\endpt\Client\MyMar::NewSchemaList()

I think in order to use Pool or Pipes with SSH2, the first thing that needs to happen is that one of the former (probably Pool) needs to have a podling-type which stores the Stream-objects in QStream-objects instead of directly, so we have something that can handle the QOApp* properties.

Note To Self: remember that these are different things —

  • Sys\InOut\Connx\Stream\Exec\SSH2 is a Stream attached to an executing process (on a remote server via SSH2)
  • IO\Aspect\Connx\Server\SSH2 is the wrapper for managing the remotely-executing process itself
    • Eventually (is it time now?), the Server clade-family should be moved to Sys\InOut\Connx\Server.

If I can't get my brain to unlock soon about what to do next, then that may be a thing to do.

...okay, I moved it. Now I get to the "FO" stage of "FAFO".

...starting with: where should IO\Aspect go? Leave it in place? Maybe that will work...