On 2010/06/21 19:16:34, johnfargo wrote:
Hi Gagan:
I'm a little confused still at the primary intended action of this CL.
Is the
idea to balance domains that _aren't_ controlled by the Shindig server
(ie. not
proxy URLs) but which _are_ known to be balance-able in some fashion?
This type
of logic seems outside the scope of Shindig proper, and could be
implemented in
other ways, eg. as a purpose-built ProxyUriManager injected into a
given
installation.
Or is it instead intended as a way to simply ensure that when
generating proxy
URIs, they're generated using some kind of balancing algorithm? In
that case,
I'd still suggest that a ProxyUriManager implementation be used, but
since the
URI is under control of Shindig, it would make sense to put in
Shindig. An
example impl might, for instance, introduce a substitution token in
proxy Uris:
"gadgets.uri.proxy.host": "%balanced%.foo.com"
...where the value of %balanced% could be supplied by an @Inject'ed
class.
--j
Hi John I agree that some kind of ProxyUriManager or DomainBalancingUriProvider might be better here. The original intent of this cl is to provide a generic enough rewriter that allows for both the use cases you suggested (accelerated proxy urls + non proxied urls that can be balanced). I dont think your %balanced% solution is generic enough, but it looks really clean :) Could you elaborate more on how to provide its value using guice. Say the current page has a list of uri U1, U2, U3 ... and your domain balancing manager needs all the urls on page to come up with an effective split. Thanks Gagan http://codereview.appspot.com/1674041/show
