Okay, I've got the auction part of the dash adventure completed.  In
principle, the rest should be relatively easy.  The code isn't vastly
useful or commented so far, it's just a proof of concept really.

The script doesn't prune unlikely matches (e.g. socat+ssh when ssh is
already provided), because that doesn't work in the general case: say
there are two pipelines, a->b->c and a->c->b.  If a->b->c fails, it
could be due to a problem in a, b, c, or some interaction between the
three.  Without knowing more about the error, we can't assume that
a->c->b will fail.  Here's a rough guide to the script:

* Right now, the script reads bids from remote_help.txt, but will
  eventually take bids by polling a separate set of module scripts

* A module script is run with a to-be-decided set of command line
  arguments.  I'm currently thinking it'll be something like:

  my-module.sh --want remote-shell --remoteuser andrew \
         --remotehost example.com

  this will have to be decided as modules are written - there'll
  doubtless be some rules, some precedents, and some totally
  protocol-specific things

* Modules that sub-contract part of the job will be assumed to handle
  subcontracts internally (it's just a matter of calling remote_help.sh
  again with the appropriate arguments)

* Every module is polled in every auction.  Inapplicable scripts will
  return no bids, bids with a variety of subcontractors will return
  multiple bids

* A bid is a line printed on standard output, of the form:

  <integer> <command line>

  The integer is the bid, the remainder of the line is a command to pass
  to /bin/sh

* The highest bidder is repeatedly run until a bidder returns
  successfully (note: currently, all bids are run)

* This would have been a lot easier if I could rely on `sort` and `head`
  existing!

How should we proceed with this?  Set up some space on Sourceforge?  Do
you have any better ideas for names than "remote help"?

        - Andrew

Attachment: remote_help.sh
Description: application/shellscript

-1 echo problem
3 /bin/false
2 echo foo
2 echo '    2'
3 echo bar
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to