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 trade consistency for availability]
Date Tue, 28 Feb 2012 14:11:32 GMT

>> What are the consistency assumptions a JCR client should be allowed to
>> make?
>>
>> An approach where temporary inconsistencies are tolerated (i.e. eventual
>> consistency) increases availability and throughput. In such a case
>> do/can/should we tolerate temporary violations of:
>>
>> - Node type constraints?
>
> so far we seem to have only discussed edge cases where node type
> constraints could be violated. I think, they are not too relevant in
> a real life system. I'd be OK to make some compromises in this area.

With the current Microkernel whether these cases (i.e. write skew) [1] 
are edge case or not depends on the degree of write concurrency we 
anticipate. If we fully synchronize all writes, these cases wont occur 
at all. If OTOH we aim for highly concurrent writes, we will see such 
cases possibly more often than we like.

[1] 
http://wiki.apache.org/jackrabbit/Transactional%20model%20of%20the%20Microkernel%20based%20Jackrabbit%20prototype

>> - Access control rights?
>
> I don't think any violations are acceptable here.

Me neither. But again we need to be aware of the write skew issue here: 
an ACL implementation must be very careful about its consistency 
assumptions or it will eventually fail.

>> - Lock enforcement?
>
> that's definitively a tough one because it depends on repository
> wide state.

This is an area where Apache Zookeeper might help out.

>> - Query index consistency?
>
> I think consistency is a prerequisite here, otherwise it's quite
> difficult to implement the query functionality. I'd rather
> make compromises for availability. eg. terminate a long query
> execution with an exception because the snapshot it was
> working on is not available anymore.

I was more thinking of the other direction: would it be tolerable to 
have the query index not up to date yet? (i.e. after a possibly large 
save.) Again, this could either result in incomplete query results, an 
exception or the query to be deferred until the index is up to date. 
Maybe we could even let the client chose through 'query hints'.

Michael

>
>> - Atomicity of save operations?
>
> how does a temporary violation of atomic saves look like?
> are you thinking of partially visible changes?
>
> regards
>   marcel
>
>> - ...?
>>
>> Should we offer alternatives in some of these cases? That is, give the
>> client the ability to choose between consistency and availability.
>>
>> Michael
>>
>>
>> [1]
>> http://wiki.apache.org/jackrabbit/Goals%20and%20non%20goals%20for%20J
>> ackrabbit%203

Mime
View raw message