curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Haddorp <hendrik.hadd...@gmx.net>
Subject Re: cache recipes
Date Thu, 17 Nov 2016 20:18:47 GMT
Thanks, that was a pretty fast answer! Not quite what I had hoped for 
but at least now I know that I was right that I have to handle this 
myself :-)

On 17.11.2016 21:13, Cameron McKenzie wrote:
>
> Hey Hendrick,
> The recipes don't treat local updates any differently to remote 
> updates. The cache will get updated when the cursor client receives a 
> watch event from Zookeeper.
>
> So your assertions are correct. The caches provide eventual 
> consistency. If you need to ensure that there are no dirty reads 
> between when you write locally and when you read from the cache you 
> would need to wrap the cache in some manner.
>
> Cheers
>
>
> On 18 Nov 2016 7:06 AM, "Hendrik Haddorp" <hendrik.haddorp@gmx.net 
> <mailto:hendrik.haddorp@gmx.net>> wrote:
>
>     Hi,
>
>     I'm trying to use a cache recipe, like the TreeCache. The cache
>     itself works just fine but what I don't understand is how I'm
>     supposed to handle locally triggered updates correctly. I can
>     start the TreeCache and using the events I know when it is
>     initialized but what if I delete a child node or update a node for
>     example? If I read the data out of the cache before I get the
>     corresponding update events I get old data. As there doesn't seem
>     to be an invalidation mechanism I seem to be required to track
>     outstanding updates. Or am I missing something?
>
>     regards,
>     Hendrik
>


Mime
View raw message