sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Zahler <...@hitthecodejack.com>
Subject Re: [IDEA][POC] Resource Based Caching in Sling
Date Mon, 02 Sep 2019 21:15:29 GMT
Hi Carsten,
Yes, at least for now, I'm completely relying on filters.
I think that approach should work, but there are a few cases where additional information
from sling could help (for example detecting that gzip compression is applied). I have not
looked into that in detail.

That said, unfortunately, I am not familiar with the implementation of the sling engine, so
I don't know if my approach is the best possible option.

Regards,
Ben

-- 
Ben Zahler
Hit the code jack gmbh | Bergweg 17 | CH-4450 Sissach
Phone: +41 79 570 8052 | https://www.hitthecodejack.com/
 

On 02.09.19, 17:47, "Carsten Ziegeler" <cziegeler@apache.org> wrote:

    Hi Ben
    
    definitely an interesting PoC.
    
    Is my understanding correct, that you don't need any changes in Sling 
    itself (like the engine, script handlers etc.) and you're completely 
    relying on filters?
    
    Regards
    Carsten
    
    Am 01.09.2019 um 14:48 schrieb Ben Zahler:
    > Dear Sling-Devs,
    > 
    > A long time ago, I proposed implementing resource based caching in Sling: http://apache-sling.73963.n3.nabble.com/Idea-Caching-in-Sling-td4036886.html
    > 
    >   
    > 
    > I did get some nice feedback, but unfortunately the daily life forces proved to be
too strong and I never followed up on this.
    > 
    >   
    > 
    > Finally, a few months ago I decided to start a POC and I feel that’s in a state
where I can share it with you.
    > 
    >   
    > 
    > The idea in a nutshell:
    > Cache the output of Sling requests in memory (infinispan)
    > Allow developers to configure component behavior (e.g. re-render specific components
for each request)
    >   
    > 
    > Source Code and Documentation can be found here:
    > 
    > https://gitlab.com/hit-the-cache-jack/hit-the-cache-jack/wikis/home
    > 
    >   
    > 
    > Some points to consider:
    > Code is for a POC, I think it’s in reasonably good state but of course far from
production coding standards
    > The code has some AEM dependencies, but I have already implemented the concepts to
make this 100% sling specific
    >   
    > 
    > I have set up a demo environment with one AEM Publish instance running the We-Retail
application.
    > 
    > The following things can be observed there:
    > Top navigation is cached correctly for both logged in and anonymous users
    > Cart is displayed in top navigation correctly per user, adding items to the cart
works
    > CSRF tokens are generated correctly
    > All the regular page content is fully read from the in memory cache.
    >   
    > 
    > The demo environment can be accessed in three ways:
    > 
    > ·  direct access with caching POC enabled
    > 
    > ·  Cloudflare-caching for static content (images, JS and CSS files) POC code used
for all other content
    > 
    > ·  Default AEM dispatcher cache (sling caching POC is disabled)
    > 
    >   
    > 
    > Feel free to log in with user1/user1 or user2/user2 to test the cart.
    > 
    >   
    > 
    > I know this is quite a significant intervention into how sling works, there are quite
a few risks associated with this that I may not even be aware of.
    > 
    > Still, if you think this could be interesting to be integrated into Sling in one
way or another, I’m very happy to donate my source code.
    > 
    >   
    > 
    > I hoped I would be able to join adapt.to to discuss this with you, but I can’t
make it for more than one day, so I decided to skip adapt.to (again) this year.
    > 
    > Would be great to get some feedback if this is of any interest to you and maybe even
get some input on what must be improved and changed.
    > 
    >   
    > 
    > Thanks for any feedback!
    > 
    > Ben
    > 
    >   
    > 
    >   
    > 
    
    -- 
    --
    Carsten Ziegeler
    Adobe Research Switzerland
    cziegeler@apache.org
    



Mime
View raw message