jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mic...@gmail.com>
Subject oak-api and move operations
Date Thu, 29 Mar 2012 21:25:58 GMT


Thinking about how to implement the jcr operations on top of the oak api 
I noted some impedance mismatch: while there are move and copy 
operations on both the Microkernel API and on JCR, the oak-api does not 
provide these operations directly. Instead they have to be expressed in 
terms of add and delete operations.

While this is not a problem for the user of the API, I think it is 
problematic for the implementer: AFAIKT there is no way to reliably 
recover move and copy operations just by comparing raw trees (*).

I spent considerable time on them same issue earlier this year while 
working on the TransientSpace implementation in the sandbox [1] and came 
to the very same conclusion. The core idea of the solution I came up 
with then, was to turn things around: instead of expressing moves 
through add and delete, I expressed adds and deletes through moves from 
a sink/source, respectively.


(*) BTW. the Microkernel uses this approach for creating the journal and 
exhibits related deficiencies. See OAK-43.

[1] http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/

View raw message