2026/04/04
Jump to navigation
Jump to search
|
Saturday, April 4, 2026 (#94)
|
|
References |
- 09:21 I'm thinking there needs to be a separation of
DoCommand()functionality, to cover each of these use-cases:- "I want to run this command and leave it open for further input."
- "This is the further input for a command I expect was already opened."
- "I don't care whether there's an open command; I just want to run this one thing."
- I'm not sure this one makes sense, actually. Maybe what I really want is two pieces:
- (a) the command to run, if it hasn't already been
- (b) the stuff to be sent to that command
- Those two pieces happen to be the same as the first two use-cases, which I think kind of clarifies how they need to be modeled.
- I'm not sure this one makes sense, actually. Maybe what I really want is two pieces:
- 10:36 So maybe what needs to happen is this:
Engine(orEngine\Serverdefines how theSessionis created.- This includes the "starter-command", which is passed to the
Sessionwhen it is created.- I want to say that this is handled differently by Proc and SSH2, but model-wise it always seems to come down to: this command gets run first, and then other stuff can be sent to it.
- ...so maybe we do want
Starterto have aDoCommand(), which is what opens theSession?... but its return-type is inconsistent with that... - ...so maybe instead
Startershould have something likeNewSession(CommandIface $o), where$ois passed along to theSession. - ...but then the whole Open/Shut functionality is no longer wanted, I think.
- So should
Starternot be aConnx? Or just stub those off, as we have done many times before? I'll go with the latter for now, for the sake of JGIW.
- So should
- This includes the "starter-command", which is passed to the
- 14:57 I think the model-rule needs to be (and I don't know why this wasn't always obvious, except for the duelling-models (Proc vs. SSH2, only one will survive) being confusing):
DoCommand()from theStarteropens aSessionand runs an executable.DoCommand()from aSessionsends the command to the executable process.
- 23:06 I got to the point where it was trying to load mariadb without credentials, and the complexity of fixing that finally broke through into an idea I had had earlier of making a subclade for configuring known commands (in this case, the main engine and the dumper) -- which also required splitting the existing Engine Commands clade into a base and a Settable. All of that is pretty much written now but untested as yet.