You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Manik Surtani <ma...@jboss.org> on 2008/01/24 15:07:03 UTC

JBoss Cache as a store

Hi guys

I've just written a plugin for Lucene to use JBoss Cache as an index  
store.  The benefits of something like this are:

1.  Faster access to indexes as they will be in memory
2.  Indexes replicated across a cluster of servers
3.  Indexes "persisted" in clustered memory - faster that persistence  
to disk

The implementation I have is pretty basic for now.

Is there a set of tests in the Lucene sources I could use to test the  
"JBCDirectory", as I call it?  Perhaps something way I could change  
the "index store provider" and re-run some existing tests, and perhaps  
add some clustered tests specific to my plugin?

Finally, regarding hosting, I am happy to contribute this to Lucene  
(alongside the JEDirectory, etc) but if licensing (JBoss Cache is  
LGPL, although the plugin code can be ASL if need be) or language  
levels (the plugin depends on JBoss Cache 2.x, which requires JDK 5)  
then I'm happy to host the plugin externally.

Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik@jboss.org







---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: JBoss Cache as a store

Posted by Manik Surtani <ma...@jboss.org>.
Bump.  Anyone?


On 24 Jan 2008, at 14:07, Manik Surtani wrote:

> Hi guys
>
> I've just written a plugin for Lucene to use JBoss Cache as an index  
> store.  The benefits of something like this are:
>
> 1.  Faster access to indexes as they will be in memory
> 2.  Indexes replicated across a cluster of servers
> 3.  Indexes "persisted" in clustered memory - faster that  
> persistence to disk
>
> The implementation I have is pretty basic for now.
>
> Is there a set of tests in the Lucene sources I could use to test  
> the "JBCDirectory", as I call it?  Perhaps something way I could  
> change the "index store provider" and re-run some existing tests,  
> and perhaps add some clustered tests specific to my plugin?
>
> Finally, regarding hosting, I am happy to contribute this to Lucene  
> (alongside the JEDirectory, etc) but if licensing (JBoss Cache is  
> LGPL, although the plugin code can be ASL if need be) or language  
> levels (the plugin depends on JBoss Cache 2.x, which requires JDK 5)  
> then I'm happy to host the plugin externally.
>
> Cheers,
> --
> Manik Surtani
> Lead, JBoss Cache
> manik@jboss.org
>
>
>
>
>
>

--
Manik Surtani
Lead, JBoss Cache
manik@jboss.org







---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: JBoss Cache as a store

Posted by Karl Wettin <ka...@gmail.com>.
29 jan 2008 kl. 23.30 skrev Chris Hostetter:

> I think most of the existing tests have the Directory impl hardcoded  
> in
> them ... the best thing to do might be to refactor the existing  
> tests so
> Directory creation comes from an overridable function in a subclass...
> come ot think of it, Karl may have already done this as part of his

I did, but the patch was for old code and removed as an artifact as I  
came up with a simpler scheme, to populate my store with the contents  
of an FSDirectory and then assert the behaviour of two index readers.

See TestCompareIndices.java in LUCENE-550.


   karl

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: JBoss Cache as a store

Posted by Manik Surtani <ma...@jboss.org>.
On 29 Jan 2008, at 22:30, Chris Hostetter wrote:

>
> : Is there a set of tests in the Lucene sources I could use to test  
> the
> : "JBCDirectory", as I call it?  Perhaps something way I could  
> change the "index
> : store provider" and re-run some existing tests, and perhaps add  
> some clustered
> : tests specific to my plugin?
>
> I think most of the existing tests have the Directory impl hardcoded  
> in
> them ... the best thing to do might be to refactor the existing  
> tests so
> Directory creation comes from an overridable function in a subclass...
> come ot think of it, Karl may have already done this as part of his
> InstantiatedIndex patch (check jira) but i'm not sure ... the  
> conversation
> sounds familiar, but i think he was looking at facading the entire
> IndexReader impl not just the directory, so any refactoring approach  
> he
> might have taken may not have gone far enough to work in this case.
>
> It would certianly be nice if there was an easy way to run every  
> test in
> the test suite against an arbitrary Directory implementation.

Cool.  Well, for now, I'll follow Mark Harwood's recommendation to  
copy the relevant tests that use RAMDirectory and change the directory  
implementation.

>
>
> : Finally, regarding hosting, I am happy to contribute this to  
> Lucene (alongside
> : the JEDirectory, etc) but if licensing (JBoss Cache is LGPL,  
> although the
> : plugin code can be ASL if need be) or language levels (the plugin  
> depends on
> : JBoss Cache 2.x, which requires JDK 5) then I'm happy to host the  
> plugin
> : externally.
>
> contribs can run require 1.5 already ... an soon the trunk will move  
> to
> 1.5 so that's not really an issue, the licensing may be, but it  
> depends on
> how the integration with JBoss winds up working (ie: i don't know if
> having the build scripts download JBoss at build time to compile  
> against
> them is allowed or not)
>
>

Who would the best person be to contact about this?  I'm assuming this  
is not a problem since the JEDirectory pulls down BDBJE stuff which  
certainly isn't apache licensed.

Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik@jboss.org







---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: JBoss Cache as a store

Posted by Chris Hostetter <ho...@fucit.org>.
: Is there a set of tests in the Lucene sources I could use to test the
: "JBCDirectory", as I call it?  Perhaps something way I could change the "index
: store provider" and re-run some existing tests, and perhaps add some clustered
: tests specific to my plugin?

I think most of the existing tests have the Directory impl hardcoded in 
them ... the best thing to do might be to refactor the existing tests so 
Directory creation comes from an overridable function in a subclass...  
come ot think of it, Karl may have already done this as part of his 
InstantiatedIndex patch (check jira) but i'm not sure ... the conversation 
sounds familiar, but i think he was looking at facading the entire 
IndexReader impl not just the directory, so any refactoring approach he 
might have taken may not have gone far enough to work in this case.

It would certianly be nice if there was an easy way to run every test in 
the test suite against an arbitrary Directory implementation.

: Finally, regarding hosting, I am happy to contribute this to Lucene (alongside
: the JEDirectory, etc) but if licensing (JBoss Cache is LGPL, although the
: plugin code can be ASL if need be) or language levels (the plugin depends on
: JBoss Cache 2.x, which requires JDK 5) then I'm happy to host the plugin
: externally.

contribs can run require 1.5 already ... an soon the trunk will move to 
1.5 so that's not really an issue, the licensing may be, but it depends on 
how the integration with JBoss winds up working (ie: i don't know if 
having the build scripts download JBoss at build time to compile against 
them is allowed or not)




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org