On Wed, Nov 26, 2008 at 19:33:55 -0500, Nathan Gray wrote:
> I noticed that the other day, too.  I think the idea with
> multiple ssh connections was to make pushes and pulls faster, but
> on flaky networks, using a single connection is likely faster.
> 
> I would not mind having an option to specify that I only want to
> use one ssh connection.

Take-home message
-----------------
We have ssh-connect sharing!  If you have darcs 2 on both client and
server, darcs should only make a maximum of two ssh connections.  If it
is making more connections than this, something has gone wrong and we
would be very happy to help you figure out what.

Technical background
--------------------
Ever since darcs 2, we have a form of ssh connection sharing in which we
invoke 'darcs transfer-mode' on the remote end, and keep talking to it
whenever possible.  For this to work, however, the server must have a
version of darcs 2 installed so that on the client side darcs can run
'ssh theserver darcs transfer-mode'. 

So what this means is that if you are running darcs 2 on both ends, by
rights, you should be making a maximum of two ssh connections (once to
invoke darcs transfer-mode and once to invoke darcs apply).  If this is
not the case, something has gone wrong, hopefully something simple like,
for example, both darcs 1 and 2 both being installed on the server, with
the former being first on the PATH in non-interactive ssh.

Historical background
---------------------
For the interested, back in darcs 1.0.7 we implemented ssh connection
sharing using the SSH control master feature.  But then darcs started
hanging because (as we later found out) of a bug in openssh.  We then
disabled the ssh control master feature by default because too many
connections was a lesser evil than darcs simply hanging.  Later on, in
darcs 2, we implemented darcs transfer-mode which is a more robust
solution.  Actually, Ganesh had suggested something like darcs transfer
mode way back in FOSDEM 2006.  I wish we had actually gone ahead and
implemented it back then and avoided the whole ssh ControlMaster mess in
the first place :-)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to