9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: andrey mirtchovski <mirtchovski@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] just in case anyone has written this
Date: Mon, 27 Apr 2009 19:00:35 -0600	[thread overview]
Message-ID: <14ec7b180904271800v27b53b28u3a18bcf96e7297b@mail.gmail.com> (raw)
In-Reply-To: <13426df10904271740x193e2987r86cd11ca840c2080@mail.gmail.com>

the p9p version of xcpu used to do something similar, but the old svn
repository is gone now so i can't verify. i see an old version of rx.c
in 9grid:/usr/andrey/src/xcpu/rx.c which does something similar to
what you want with threads, channels and procs but doesn't combine the
input.

it doesn't look finished, so it may be useless. it creates a proc for
each remote host :(

it does something like this (from a perfunctory look, it's been a while):

---
# shared between all procs
create input chan
create output chan

for each node create a proc that:
    connects to node and set up a session
    creates proc for stdout
    creates proc for stderr
    waits on input chan for commands to send to the node

stdout and stderr procs do:
    read from remote host
    write to output chan
---

the aggregator part you want can be inserted between read the output
chan and whatever you need to output to, but that logic doesn't exist
in rx.c, i think :)



  reply	other threads:[~2009-04-28  1:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28  0:40 ron minnich
2009-04-28  1:00 ` andrey mirtchovski [this message]
2009-04-28  9:05 ` roger peppe
2009-04-28 14:29   ` ron minnich
2009-04-28 15:17     ` roger peppe
2009-04-28 15:32       ` andrey mirtchovski
2009-04-28 15:41         ` erik quanstrom
2009-04-28 15:52           ` andrey mirtchovski
2009-04-28 15:57             ` erik quanstrom
2009-04-28 15:38       ` ron minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14ec7b180904271800v27b53b28u3a18bcf96e7297b@mail.gmail.com \
    --to=mirtchovski@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).