From: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>,
git@vger.kernel.org, David Michael Barr <davidbarr@google.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Jeff King <peff@peff.net>, Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.
Date: Mon, 30 Jul 2012 10:12:06 +0200 [thread overview]
Message-ID: <3225988.4e4jhmQGr7@flomedio> (raw)
In-Reply-To: <20120728070030.GC4739@burratino>
On Saturday 28 July 2012 02:00:31 Jonathan Nieder wrote:
> Thanks for explaining. Now we've discussed a few different approproaches,
> none of which is perfect.
>
> a. use --cat-blob-fd, no FIFO
>
> Doing this unconditionally would break platforms that don't support
> --cat-blob-fd=(descriptor >2), like Windows, so we'd have to:
>
> * Make it conditional --- only do it (1) we are not on Windows and
> (2) the remote helper requests backflow by advertising the
> import-bidi capability.
>
> * Let the remote helper know what's going on by using
> "import-bidi" instead of "import" in the command stream to
> initiate the import.
Generally I like your prefered solution.
I think there's one problem:
The pipe needs to be created before the fork, so that the fd can be inherited.
There is no way of creating it if the remote-helper advertises a capability,
because it is already forked then. This would work with fifos, though.
We could:
- add a capability: bidi-import.
- make transport-helper create a fifo if the helper advertises it.
- add a command for remote-helpers, like 'bidi-import <pipename>' that makes
the remote helper open the fifo at <pipename> and use it.
- fast-import is forked after the helper, so we do already know if there will
be a back-pipe. If yes, open it in transport-helper and pass the fd as command
line argument cat-blob-fd.
--> fast-import wouldn't need to be changed, but we'd use a fifo, and we get
rid of the env-vars.
(I guess it could work on windows too).
What do you think?
>
> b. use envvars to pass around FIFO path
>
> This complicates the fast-import interface and makes debugging hard.
> It would be nice to avoid this if we can, but in case we can't, it's
> nice to have the option available.
>
> c. transport-helper.c uses FIFO behind the scenes.
>
> Like (a), except it would require a fast-import tweak (boo) and
> would work on Windows (yea)
>
> d. use --cat-blob-fd with FIFO
>
> Early scripted remote-svn prototypes did this to fulfill "fetch"
> requests.
>
> It has no advantage over "use --cat-blob-fd, no FIFO" except being
> easier to implement as a shell script. I'm listing this just for
> comparison; since (a) looks better in every way, I don't see any
> reason to pursue this one.
>
> Since avoiding deadlocks with bidirectional communication is always a
> little subtle, it would be nice for this to be implemented once in
> transport-helper.c rather than each remote helper author having to
> reimplement it again. As a result, my knee-jerk ranking is a > c >
> b > d.
>
> Sane?
> Jonathan
next prev parent reply other threads:[~2012-07-30 8:12 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 17:20 [RFC 0/4] Florian Achleitner
2012-06-04 17:20 ` [RFC 1/4] Implement a basic remote helper vor svn in C Florian Achleitner
2012-06-04 17:20 ` [RFC 2/4] Integrate remote-svn into svn-fe/Makefile Florian Achleitner
2012-06-04 17:20 ` [RFC 3/4] Add svndump_init_fd to allow reading dumps from arbitrary FDs Florian Achleitner
2012-06-04 17:20 ` [RFC 4/4] Add cat-blob report pipe from fast-import to remote-helper Florian Achleitner
2012-06-05 1:33 ` David Michael Barr
2012-06-05 6:56 ` Jeff King
2012-06-05 7:07 ` David Michael Barr
2012-06-05 8:14 ` Jeff King
2012-06-05 22:16 ` Florian Achleitner
2012-06-06 13:43 ` Jeff King
2012-06-06 21:04 ` Florian Achleitner
2012-06-05 8:51 ` Johannes Sixt
2012-06-05 9:07 ` Jeff King
2012-06-05 22:17 ` Florian Achleitner
2012-06-05 9:09 ` Johannes Sixt
2012-06-05 1:21 ` [RFC 3/4] Add svndump_init_fd to allow reading dumps from arbitrary FDs David Michael Barr
2012-06-29 7:49 ` [RFC 0/4 v2] Florian Achleitner
2012-06-29 7:54 ` [RFC 1/4 v2] Implement a basic remote helper for svn in C Florian Achleitner
2012-07-02 11:07 ` Jonathan Nieder
2012-07-06 0:30 ` Jonathan Nieder
2012-07-06 10:39 ` Florian Achleitner
2012-07-26 8:31 ` Florian Achleitner
2012-07-26 9:08 ` Jonathan Nieder
2012-07-26 16:16 ` Florian Achleitner
2012-07-28 7:00 ` Jonathan Nieder
2012-07-30 8:12 ` Florian Achleitner [this message]
2012-07-30 8:29 ` Jonathan Nieder
2012-07-30 13:55 ` Florian Achleitner
2012-07-30 16:55 ` Jonathan Nieder
2012-07-31 19:31 ` Florian Achleitner
2012-07-31 22:43 ` Jonathan Nieder
2012-08-01 8:25 ` Florian Achleitner
2012-08-01 19:42 ` Jonathan Nieder
2012-08-12 10:06 ` Florian Achleitner
2012-08-12 16:12 ` Jonathan Nieder
2012-08-12 19:39 ` Florian Achleitner
2012-08-12 20:10 ` Jonathan Nieder
2012-08-12 19:36 ` Jonathan Nieder
2012-07-26 17:29 ` Junio C Hamano
2012-07-30 8:12 ` Florian Achleitner
2012-07-26 9:45 ` Steven Michalske
[not found] ` <358E6F1E-8BAD-4F82-B270-0233AB86EF66@gmail.com>
2012-07-26 11:40 ` Jonathan Nieder
2012-07-26 14:28 ` Florian Achleitner
2012-07-26 14:54 ` Jonathan Nieder
2012-07-27 7:23 ` Florian Achleitner
2012-07-28 6:54 ` Jonathan Nieder
2012-06-29 7:58 ` [RFC 2/4 v2] Integrate remote-svn into svn-fe/Makefile Florian Achleitner
2012-06-29 7:59 ` [RFC 3/4 v2] Add svndump_init_fd to allow reading dumps from arbitrary FDs Florian Achleitner
2012-06-29 8:00 ` [RFC 4/4 v2] Add cat-blob report fifo from fast-import to remote-helper Florian Achleitner
2012-07-21 12:45 ` [RFC 4/4 v3] " Florian Achleitner
2012-07-21 14:48 ` Jonathan Nieder
2012-07-21 15:24 ` Florian Achleitner
2012-07-21 15:44 ` Jonathan Nieder
2012-07-22 21:03 ` Florian Achleitner
2012-07-22 21:24 ` Jonathan Nieder
2012-07-21 15:58 ` Jonathan Nieder
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=3225988.4e4jhmQGr7@flomedio \
--to=florian.achleitner.2.6.31@gmail.com \
--cc=davidbarr@google.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=srabbelier@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.