jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MMax <Maxim.Mu...@gmail.com>
Subject Re: LazyItemIterator
Date Wed, 25 Nov 2009 15:11:51 GMT

Alex, thanks a lot for this advice. Jcr2Spi with Spi2Davex works really
faster than jcr-rmi connection. :)


Alexander Klimetschek wrote:
> 
> On Tue, Nov 24, 2009 at 16:45, MMax <Maxim.Musin@gmail.com> wrote:
>> I've tried using spi2dav way but I saw great performance decreasing. RMI
>> working 10 times faster on the same repository operations.
> 
> I think the real improvement comes with spi2davex [1] which actually
> does a lot of batch operations. You can configure it on the client
> side which node depth to pre-fetch to minimize the following number of
> operations (see config example in [2] createService() with the
> BatchReadConfig). Most importantly, all write operations will happen
> in a single POST upon a save() call. I think with the spi2dav you
> still have many single POSTs for every single property, that's why it
> is still slow.
> 
> Also, to make your life simpler, you can use jcr2spi on top of
> spi2davex to use the standard jcr api. You create an
> o.a.j.jcr2spi.RepositoryImpl and pass it an
> o.a.j.jcr2spi.config.RepositoryConfig which will have to return the
> spi (in this case spi2davex) in its getRepositoryService() method.
> Also, you can configure caching/polling behaviour here for the work
> between jcr api and spi.
> 
> [1]
> http://svn.apache.org/repos/asf/jackrabbit/tags/1.6.0/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/
> [2]
> http://svn.apache.org/repos/asf/jackrabbit/tags/1.6.0/jackrabbit-spi2dav/src/test/java/org/apache/jackrabbit/spi2davex/RepositoryStubImpl.java
> [3]
> http://svn.apache.org/repos/asf/jackrabbit/tags/1.6.0/jackrabbit-jcr2spi/
> [4]
> http://svn.apache.org/repos/asf/jackrabbit/tags/1.6.0/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
> [5]
> http://svn.apache.org/repos/asf/jackrabbit/tags/1.6.0/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
> 
> Note: all the above links are for the latest stable release in 1.6.0.
> Jackrabbit 2.0 will have a simpler way of getting a repository using
> the JSR-283 standardized RepositoryFactory, which has a generic helper
> implementation in the new jcr-client lib [6]. See the test cases for
> more sample usage [7]
> 
> [6]
> http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-client/
> [7]
> http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-client/src/test/java/org/apache/jackrabbit/client/RepositoryFactoryImplTest.java
> 
> I need to put this on the website or wiki...
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://n4.nabble.com/LazyItemIterator-tp786078p787605.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message