[Yanel-dev] [Yarep] Transient storage

Michael Wechner michael.wechner at wyona.com
Tue Mar 22 11:44:41 CET 2011


Hi

In the case of JCR the API "suggests" to implement a transient storage, e.g.

node.setProperty("author", "alice");
node.refresh();
node.setProperty("author", "bob");
session.save();

which means only "author:bob" is saved persistently (whereas 
"author:alice" was just in memory, or/and maybe swapped temporarily). 
Also see

http://wiki.apache.org/jackrabbit/ExamplesPage#Versioning_Basics
http://www.day.com/specs/jcr/1.0/4.1.3.2_Transient_Storage_in_the_Session.html

In Yarep one does not have this possibility to different between 
transient and persistent, but
I think it would make sense in certain cases, e.g.

- Guarantee atomic changes
- Peformance, e.g. document parsing for Lucene (let's say 1000 
properties are set per node and parse once instead a 1000 times)

We could introduce additional methods, e.g.

boolean transient = true;
node.setProperty("author", "alice", transient);
node.save();

whereas in order to make it backwards compatible one could introduce 
this as a versioned interface.

WDYT?

Thanks

Michael


More information about the Yanel-development mailing list