You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@gmail.com> on 2008/10/02 17:12:39 UTC

OT: Serf and caching proxy? (was: svn commit: r33398 - trunk/notes)

On Thu, Oct 2, 2008 at 12:58 PM, Justin Erenkrantz
<ju...@erenkrantz.com> wrote:
> On Thu, Oct 2, 2008 at 9:34 AM, Ben Collins-Sussman
> <su...@red-bean.com> wrote:
>> Curious -- why do you prefer putting the "verbs" and parameters
>> directly into the path space, rather than having them as query
>> strings?   I had chat about this topic with gstein in IRC, and he
>> seemed to prefer query-args.
>>
>> Is there really any technical advantage to one style over another, or
>> is it just a bikeshed?
>
> There's a tiny amount of bikeshed as I think you can make both work,
> but I think it's better to avoid query strings as there are at least
> some costs involved in supporting them.  But, to me, I think doing
> everything as query args makes the module a tiny bit more complex that
> I think we could avoid.
>
> Caching is also a factor here - as if we use query args, we have to
> explicitly override and specify which responses are cacheable; but
> some caches are a little stupid and don't consider query args as ever
> being a differentiator.  Also, from a server admin perspective, if we
> are explicit about verbage in the URL path space, it makes it slightly
> simpler to configure balancing/proxying.  For example, I'd like to
> simplify the pass-through logic for the write-through mirror to just
> look at the URL space - looking at the bodies of the request is lame.
> Ideally, if we stick everything into URL space as paths, you could
> configure the load-balancing/write-through entirely with a cluster of
> ProxyPass directives - ProxyPass won't look at query strings, IIRC.

Are there any specific caching proxies that are known to work with the
current ra_serf to speed-up things like repeated checkouts?  I've
tried Squid, Apache 2.2 and Polipo.  They all work with Neon, but when
I try to use Serf no requests work.  I always get an error:

subversion/libsvn_ra_serf/util.c:558: (apr_err=47)
svn: Error running context: Address family not supported by protocol family

In servers I have:

[global]
http-proxy-host = 127.0.0.1
http-proxy-port = 8080
http-library = serf

I am guessing this has something to do with HTTP 1.1 ?

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: OT: Serf and caching proxy? (was: svn commit: r33398 - trunk/notes)

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Thu, Oct 2, 2008 at 11:20 AM, Mark Phippard <ma...@gmail.com> wrote:
> Your patch gets me further, but now a Bus error:

Well, either a stackdump or a wireshark/tcpdump capture would be
appreciated.  =)  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: OT: Serf and caching proxy? (was: svn commit: r33398 - trunk/notes)

Posted by Mark Phippard <ma...@gmail.com>.
On Thu, Oct 2, 2008 at 1:50 PM, Mark Phippard <ma...@gmail.com> wrote:
> On Thu, Oct 2, 2008 at 1:46 PM, Justin Erenkrantz <ju...@erenkrantz.com> wrote:
>> On Thu, Oct 2, 2008 at 10:12 AM, Mark Phippard <ma...@gmail.com> wrote:
>>> subversion/libsvn_ra_serf/util.c:558: (apr_err=47)
>>> svn: Error running context: Address family not supported by protocol family
>>
>> I believe that Lieven largely tested the proxy stuff on Windows, but
>> I'm not 100% sure.  But, I think below should fix it if you are on
>> another platform.  Lieven, does this look right?  -- justin
>
> I am trying this from OSX.  I'll' try applying your patch in a bit.  I
> think I am currently using Serf from MacPorts.

Your patch gets me further, but now a Bus error:

$ svn ls http://svn.collab.net/repos/svn
README
branches/
developer-resources/
mk.xiv/
svn-logos/
tags/
trunk/
Bus error
$ svn co http://svn.collab.net/repos/svn/trunk co1
Bus error

This is with current trunk of SVN and Serf + your patch.  And Apache
httpd proxy.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: OT: Serf and caching proxy? (was: svn commit: r33398 - trunk/notes)

Posted by Mark Phippard <ma...@gmail.com>.
On Thu, Oct 2, 2008 at 1:46 PM, Justin Erenkrantz <ju...@erenkrantz.com> wrote:
> On Thu, Oct 2, 2008 at 10:12 AM, Mark Phippard <ma...@gmail.com> wrote:
>> subversion/libsvn_ra_serf/util.c:558: (apr_err=47)
>> svn: Error running context: Address family not supported by protocol family
>
> I believe that Lieven largely tested the proxy stuff on Windows, but
> I'm not 100% sure.  But, I think below should fix it if you are on
> another platform.  Lieven, does this look right?  -- justin

I am trying this from OSX.  I'll' try applying your patch in a bit.  I
think I am currently using Serf from MacPorts.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: OT: Serf and caching proxy? (was: svn commit: r33398 - trunk/notes)

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Thu, Oct 2, 2008 at 10:12 AM, Mark Phippard <ma...@gmail.com> wrote:
> subversion/libsvn_ra_serf/util.c:558: (apr_err=47)
> svn: Error running context: Address family not supported by protocol family

I believe that Lieven largely tested the proxy stuff on Windows, but
I'm not 100% sure.  But, I think below should fix it if you are on
another platform.  Lieven, does this look right?  -- justin

Index: context.c
===================================================================
--- context.c	(revision 1195)
+++ context.c	(working copy)
@@ -294,7 +294,13 @@
         apr_pool_clear(conn->skt_pool);
         apr_pool_cleanup_register(conn->skt_pool, conn, clean_skt, clean_skt);

-        if ((status = apr_socket_create(&skt, conn->address->family,
+        /* Do we have to connect to a proxy server? */
+        if (ctx->proxy_address)
+            serv_addr = ctx->proxy_address;
+        else
+            serv_addr = conn->address;
+
+        if ((status = apr_socket_create(&skt, serv_addr->family,
                                         SOCK_STREAM,
 #if APR_MAJOR_VERSION > 0
                                         APR_PROTO_TCP,
@@ -314,12 +320,6 @@
         /* Configured. Store it into the connection now. */
         conn->skt = skt;

-        /* Do we have to connect to a proxy server? */
-        if (ctx->proxy_address)
-            serv_addr = ctx->proxy_address;
-        else
-            serv_addr = conn->address;
-
         /* Now that the socket is set up, let's connect it. This should
          * return immediately.
          */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org