Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: SSH2 - Asynchronous Opens & Synchronous Commands

by sundialsvc4 (Abbot)
on Apr 04, 2014 at 13:31 UTC ( #1081135=note: print w/replies, xml ) Need Help??

in reply to SSH2 - Asynchronous Opens & Synchronous Commands

I perceive that you will probably need to spawn a child process for each device and to use a message queue.   The real difficulty is going to be how to describe the state-machine type logic that must be performed by the main process that is controlling the tests.   I vaguely remember encountering such a testing framework I no longer remember what its name is or was but it was built using XML, vaguely like what ColdFusion does.

The test file consisted of an arbitrary number of test-nodes, one being designated as the initial-state.   Each one had “preconditions,” “actions,” and “effects.”   They could be “singleton,” or “parallel.”     The test-runner used this information to decide what to tell its slaves to do next.   I recall that while the framework worked, it was .. difficult .. to program tests for it . . .

Thinking a little bit more about this, I do believe that it is the right approach to have n processes, one per SSH2 connection, who are basically “proxies” for that connection and who are directly responsible for (a) knowing what that host is or isn’t doing at this time, and (b) telling the host to do whatever-it-is and to correctly report that host’s new status.   They are, effectively, “supervisors” for each host, and the first line of defense in dealing with hiccups.   Then, the remaining process-of-significance (probably, the last remaining child of the parent) is the test-runner process itself, which acts by sending and receiving messages via IPC queues to each host-supervisor.

  • Comment on Re: SSH2 - Asynchronous Opens & Synchronous Commands

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1081135]
Jar. Jar!...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2017-11-19 08:45 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (278 votes). Check out past polls.