[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] cvssync, ssh, serve stdio need a missing common inf
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] cvssync, ssh, serve stdio need a missing common infrastructure |
Date: |
Wed, 25 May 2005 21:46:18 -0700 |
User-agent: |
Mutt/1.5.9i |
On Wed, May 25, 2005 at 09:45:53AM +0200, Christof Petig wrote:
> while dusting off the ssh (and serve stdio) branch I realized that all
> these works need a common infrastructure: The ability to
> (cross-platform!) deal with pipes.
Actually, 'automate stdio' should be doable by making stdin
non-buffered, which I believe can be done portably with just
iostreams -- no select() needed. There was some discussion of this on
IRC a day or two ago, and I think it's implemented now?
The other ones... yeah, it's all very annoying.
One possibility, which may be a terrible idea, but I'll throw it out
here -- by coincidence, I have the skeleton of a nice generic library
for doing asynch programming in C++, called "Chryn"; it's heavily
inspired by Twisted, if anyone is familar with that python library.
I've stuck the code up for netsync at venge.net, collection
"org.vorpus.chryn". Conceivably, we could switch over to using it
instead of Netxx.
Downsides to this plan:
-- it's very unfinished. At the moment it doesn't even compile,
since when I last put it down, I was in the middle of some
refactoring. It doesn't have any process support at all ATM. It
doesn't have any Win32 support at all ATM.
-- finishing it distracts development effort from monotone for no
immediate gain
-- if it were finished, switching monotone over to using it might
distract development effort away from improving monotone proper
for no immediate gain ("might", depending on whether this switch
would instantly make it possible to run netsync over pipes, or
whether that would take some extra effort).
Upsides to this plan:
-- it's a generally useful library; I'm quite shocked that nobody
has written something similar, and there are lots of programs
that could conceivably want to base themselves off of it. so
perhaps there are people who would not otherwise contribute to
monotone, but that would be interested in working on it.
-- if we're going to deal with cross-platform process management and
pipes, we're going to end up needing some sort of abstraction
interface over the whole mess anyway; it may actually be easier
to get there by writing that part of a library like this, than to
hack something one-off. Pipes are annoying enough, but then you
get into SIGCHLD and all that...
I know Matthew Gregan ("kinetik") was interested in looking into this;
you might talk to him when he gets back from vacation.
-- Nathaniel
--
"...these, like all words, have single, decontextualized meanings: everyone
knows what each of these words means, everyone knows what constitutes an
instance of each of their referents. Language is fixed. Meaning is
certain. Santa Claus comes down the chimney at midnight on December 24."
-- The Language War, Robin Lakoff