On Fri, Nov 21, 2008 at 8:16 AM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
> [...]
> The sling:vanityPath property is multi-valued and contains URLs. These
> URLs may be absolute or relative. An absolute URI includes the scheme,
> authority and path. A relative omits the scheme and or authority part.
> In additiona relative URI may even be a relative path.
>
> To resolve a request URL with Host: header and path, the resource
> resolver would first check whether there is an exact match for the path
> in the repository. If not, the resource resolver will then -- from the
> top of the resource tree -- look for a resource whose sling:vanityPath
> matches the Host: header plus (optionally) any prefix of the path. From
> there the path would be traversed down along resource names and relative
> sling:vanityPath entries to find the final resource.
>
> This _is_ expensive and therefore absolutely requires caching.
> Therefore, we will introduce a small (something like 1000 entries or
> so), which may be used to directly map incoming requests to resources.
> The cache is managed very simply: on each change in the resource tree,
> the cache is just dropped.

I'm not thrilled about the idea of dropping the cache on every change.
In our application, there will be changes maybe every minute,
effectively leaving the cache unusable.

Is there a significant benefit of adding domain resolution to the
vanityPath system, as opposed to having a different mechanism for
domains?
I would think it would be less expensive to
a) Restrict the location of domain roots to a specified location
(let's say /domains). Then the domainroot cache could just observe
/domains for changes, and would not have to be dropped on every change
in the tree
- or -
b) Use a separate mixin nodetype for domainroots, and let the domain
cache observe the nodetype (see Bertrands comment at [1])

(I haven't looked much into the vanityPath system, so maybe it would
have to be rewritten anyway domainroots are implemented.)

[1] 
https://issues.apache.org/jira/browse/SLING-249?focusedCommentId=12649425#action_12649425

-- 
Vidar S. Ramdal <[EMAIL PROTECTED]> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

Reply via email to