2026/04/04

From WoozleCodes
< 2026 | 04
Jump to navigation Jump to search
Saturday, April 4, 2026 (#94)
Friday Saturday Sunday posts:prev <this> next

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.
  • 10:36 So maybe what needs to happen is this:
    • Engine (or Engine\Server defines how the Session is created.
      • This includes the "starter-command", which is passed to the Session when 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 Starter to have a DoCommand(), which is what opens the Session?... but its return-type is inconsistent with that...
      • ...so maybe instead Starter should have something like NewSession(CommandIface $o), where $o is passed along to the Session.
      • ...but then the whole Open/Shut functionality is no longer wanted, I think.
        • So should Starter not be a Connx? 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.
  • 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 the Starter opens a Session and runs an executable.
    • DoCommand() from a Session sends 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.