On Wed, Nov 25, 2009 at 5:54 PM, philippe van dyck <[email protected]> wrote:

> Multiple side effects could be added in order to support merging, splitting 
> or copying of one ES to another.
>
> I am in the process of writing the Infinispan ES (with an S3 store) and I 
> would like to design a migration tool from one ES to another (infrastructure 
> or version).
>
> I was thinking of some kind of "copy on write" side effect, with a background 
> thread actually reading and writing all the entities in order to get rid of 
> the previous ES once the copy is finished.
>
> WDYT ? Is there a better way to do this ?

I doubt that Copy-on-Write is feasible, since long lived read-only
entities would not 'migrate'.

In the past, I did the other way around, i.e.

ReadInNew
IfNotFound
    MoveFromOldToNew
    ReadInNew

This could potentially be cascaded across several generations.

Now, this can't be implemented using SideEffects, and instead a
Concern is required, which would do the "move+retry" invisibly to the
ES or UoW.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to