[Yanel-dev] [Yarep] Transient storage

Michael Wechner michael.wechner at wyona.com
Tue Mar 22 12:09:25 CET 2011


On 3/22/11 11:44 AM, Michael Wechner wrote:
> 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)

Re indexing it came to my mind that we could make the 
explicite/implicite indexing configurable within the search-config, e.g.

<s:search-index on-persistence="false" ...

whereas default would be true in order to stay backwards compatible, but 
if set to false, then one
could call the indexer explicitely

node.setProperty("author", "alice");
....
repository.getIndexer().index(node);

>
> 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.

Balz just pointed out to me

http://openejb.apache.org/3.0/jpa-concepts.html

which might also give some good ideas.

Thanks

Michael
>
> WDYT?
>
> Thanks
>
> Michael



More information about the Yanel-development mailing list