jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: [jr3 microkernel] Write skew
Date Thu, 01 Dec 2011 12:21:56 GMT

>> So we (thinking of Sling amongst other things) might have to adapt
>> our event listeners to do a Session.refresh at the beginning of the
>> onEvent method (in case long lived sessions are used).
> For obvious reasons a snapshot-based implementation would need to
> implicitly call refresh(true) on a session before delivering
> observation events.

IIUC you want to "auto-refresh" all sessions each time observation 
events are being delivered?

Why do we 'obviously' need this? I understand, there will be a change 
from the current behaviour: while today sessions can't see items anymore 
which they get DELETE events for, in the new implementation sessions 
can't see items yet which they get ADD events for. From that perspective 
the new behaviour seems more flexible and complete: sessions can see 
deleted items until they do a refresh. Afterwards they can see the added 


>> Sure. I think the main problem with long lived sessions I know of
>> (in Sling based applications) is with Observation Listeners which
>> are quite isolated and can be "fixed" easily -- there just has to
>> be awareness.
> The above approach should limit the impact on observation listeners.
> Also, to help prevent issues with other kinds of long-lived sessions,
> it might be a good idea to have a configurable auto-refresh policy.
> BR,
> Jukka Zitting

View raw message