monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Unix domain sockets


From: William Uther
Subject: [Monotone-devel] Unix domain sockets
Date: Sat, 14 Jul 2007 18:06:36 -0700

Hi all,

I was looking at the "dumb pull" code again, and decided that was non-trivial to make useful for beginner end users. At the same time I live in a world of firewalls and so I can't run netsync on its own port. Finally, the ssh:// transport scheme locks the db, making it inappropriate for large scale use.

My latest approach is to make a new transport scheme; ssh+ux:// and is in the branch: net.venge.monotone.local-sockets. The server is started once and listens on a unix domain socket (addressed through the file system on the server):

mtn serve --db=myDB.mtn --no-transport-auth --bind-local-socket=/a/ path/i/can/use

A client then connects by opening an ssh connection and uses the "socat" command to connect the unix socket to stdio:

mtn --db=localDB.mtn pull ssh+ux://host/a/path/i/can/use "*"

Multiple clients can connect at the same time, and they all work correctly.

Implementation:

The changes are quite small. Netxx already handles local domain sockets. All I had to do was introduce a way to pass the path through. And I had to change the standard lua hooks to make the client side use the scheme. The only issue at the moment is that this requires "socat" which is not as common as one might like.

Thoughts?

Will           :-}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]