* Re: GIT push to sftp (feature request)
2007-08-05 22:20 ` Matthieu Moy
@ 2007-08-06 0:00 ` Martin Langhoff
2007-08-06 8:59 ` Matthieu Moy
2007-08-06 0:14 ` Jakub Narebski
2007-08-07 21:50 ` Jan Hudec
2 siblings, 1 reply; 8+ messages in thread
From: Martin Langhoff @ 2007-08-06 0:00 UTC (permalink / raw)
To: Martin Langhoff, pavlix, git
On 8/6/07, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> "Martin Langhoff" <martin.langhoff@gmail.com> writes:
>
> > Git tries to be smart in at least 2 ways that don't work with dump
> > protocols: it works locklessly (yet it performs atomic updates) and it
> > sends only the objects needed over the wire (saving a lot of
> > bandwidth).
> >
> > Using dumb protocols it's impossible to do either.
>
> That's not exactly true. You can't be as efficient with dumb protocols
You are right -- I should have said: it's pretty hard, and we haven't
put the effort ;-)
there's been discussion recently of having info in the pack index that
would support http range requests.
> (its ancestor,
> GNU Arch, also had a way to be network-efficient on dumb protocols).
Do I remember your name from gnuarch-users? -- that Arch/tla was never
particularly efficient, and fetches of large updates were slow and
painful. Surely it was efficient on paper though :-p
> Regarding atomic and lock-less updates, I believe this is
> implementable too as soon as you have an atomit "rename" in the
> protocol. But here, bzr isn't a proof of existance, it does locking.
And I should have said - minimal locking rather than no locking
To update it safely, you need to open with a lock, read to ensure the
sha1 is what you think it is, write the new sha1, close. A rename is
still subject to race conditions.
IMVHO it would be good to have a way to push over sftp even it it is
slow, unsafe and full of big blinking warnings. git itself is sane
enough that the client side won't get corrupted or lose data if there
is a race condition on the server side.
Given a brief delay, the client can probably check - post push - that
the operation wasn't clobbered by a race condition. Of course, this
*is* sticks-and-bubblegum approach on the server side. But a solid
client repo makes almost any server-side disaster recoverable.
cheers,
martin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GIT push to sftp (feature request)
2007-08-06 0:00 ` Martin Langhoff
@ 2007-08-06 8:59 ` Matthieu Moy
0 siblings, 0 replies; 8+ messages in thread
From: Matthieu Moy @ 2007-08-06 8:59 UTC (permalink / raw)
To: Martin Langhoff; +Cc: pavlix, git
"Martin Langhoff" <martin.langhoff@gmail.com> writes:
> On 8/6/07, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>> > Using dumb protocols it's impossible to do either.
>>
>> That's not exactly true. You can't be as efficient with dumb protocols
>
> You are right -- I should have said: it's pretty hard, and we haven't
> put the effort ;-)
Yes, that seems more accurate.
>> (its ancestor,
>> GNU Arch, also had a way to be network-efficient on dumb protocols).
>
> Do I remember your name from gnuarch-users?
Possibly so, yes. I also remembered yours from the old good time where
people started explaining why they unsubscribed the list and migrated
to something better ;-).
> -- that Arch/tla was never particularly efficient, and fetches of
> large updates were slow and painful. Surely it was efficient on
> paper though :-p
It was actually efficient in terms of bandwidth. You downloaded only
the needed pieces (this has to do with the fact that the original
author wrote it at a time when he had only a slow modem connection).
But badly pipelined, and local operations were slow, so the result was
obviously _very_ far from what git can do.
--
Matthieu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GIT push to sftp (feature request)
2007-08-05 22:20 ` Matthieu Moy
2007-08-06 0:00 ` Martin Langhoff
@ 2007-08-06 0:14 ` Jakub Narebski
2007-08-07 21:50 ` Jan Hudec
2 siblings, 0 replies; 8+ messages in thread
From: Jakub Narebski @ 2007-08-06 0:14 UTC (permalink / raw)
To: git
Matthieu Moy wrote:
> "Martin Langhoff" <martin.langhoff@gmail.com> writes:
>
>> Git tries to be smart in at least 2 ways that don't work with dump
>> protocols: it works locklessly (yet it performs atomic updates) and it
>> sends only the objects needed over the wire (saving a lot of
>> bandwidth).
>>
>> Using dumb protocols it's impossible to do either.
But git _can_ push over http protocol (with WebDAV), and http is a dumb
protocol, and over rsync (although it is deprecated).
> That's not exactly true. You can't be as efficient with dumb protocols
> than you are with a dedicated protocol (something with some
> intelligence on both sides), but at least the second point you mention
> can be achieved with a dumb protocol, and bzr is a proof of existance.
> To read over HTTP, it uses ranges request, and to push over
> ftp/sftp/webdav, it appends new data to existing files (its ancestor,
> GNU Arch, also had a way to be network-efficient on dumb protocols).
If I understand correctly to read (fetch) over http and other dumb
protocols (like ftp), git uses two indices .git/info/refs
and .git/objects/info/packs which must be present on the server serving
http protocol (see git-update-server-info) to calculate which packs
to get, and I think it always downloads whole packs, but I'm not sure...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GIT push to sftp (feature request)
2007-08-05 22:20 ` Matthieu Moy
2007-08-06 0:00 ` Martin Langhoff
2007-08-06 0:14 ` Jakub Narebski
@ 2007-08-07 21:50 ` Jan Hudec
2 siblings, 0 replies; 8+ messages in thread
From: Jan Hudec @ 2007-08-07 21:50 UTC (permalink / raw)
To: Martin Langhoff, pavlix, git
[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]
On Mon, Aug 06, 2007 at 00:20:55 +0200, Matthieu Moy wrote:
> "Martin Langhoff" <martin.langhoff@gmail.com> writes:
>
> > Git tries to be smart in at least 2 ways that don't work with dump
> > protocols: it works locklessly (yet it performs atomic updates) and it
> > sends only the objects needed over the wire (saving a lot of
> > bandwidth).
> >
> > Using dumb protocols it's impossible to do either.
>
> That's not exactly true. You can't be as efficient with dumb protocols
> than you are with a dedicated protocol (something with some
> intelligence on both sides), but at least the second point you mention
> can be achieved with a dumb protocol, and bzr is a proof of existance.
> To read over HTTP, it uses ranges request, and to push over
> ftp/sftp/webdav, it appends new data to existing files (its ancestor,
> GNU Arch, also had a way to be network-efficient on dumb protocols).
I believe bzr locks are not completely safe in a sense that breaking a lock
does not cause the operation to immediately abort. GNU Arch ones did, but
it's specific data layout was part of a reason why it worked (it wrote the
data to a directory, so removing that would abort the operation).
> Regarding atomic and lock-less updates, I believe this is
> implementable too as soon as you have an atomit "rename" in the
> protocol. But here, bzr isn't a proof of existance, it does locking.
Actually rename or link is necessary for atomic updates, lockless or lockful.
Slight problem with it is, that unix (and similar) systems allow overwriting
another file on rename (and do so atomically in a sense the destination
always exists), while windooze fail if the target exists. Most network
protocols don't specify overwriting and simply do whatever the underlying
system does. GNU Arch solved this by renaming directories, which are not
overwriten under any system.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread