[hibernate-dev] Hibernate Search: Infinispan DirectoryProvider

Sanne Grinovero sanne.grinovero at gmail.com
Tue Mar 9 06:47:15 EST 2010


Hi all,
I'd like to merge the Infinispan DirectoryProvider soon:

The code is trivial as it was designed primarily for Search, but some
points need to be discussed:

1) Dependencies
1A) Transaction implementation:
It does require Infinispan modules, most are transitive dependencies of
   <groupId>org.infinispan</groupId>
   <artifactId>infinispan-lucene-directory</artifactId>

but it also requires a transaction manager implementation, which is
not enforced by infinispan as any implementation will do.
Shall we "suggest" one as optional dependency?
This is going to add many dependencies, but we need something at least
for tests.

1B) JGroups
Infinispan depends on newer JGroups version than the one currently
tested by the jgroups backend. I'd expect the new version to work the
same, but are we going to explicitly depend on the same version of
Infinispan?

2) Infinispan initialization
A single CacheManager should be shared across many caches; in practice
while I'd suggest to use a different cache per index we even do
support more than one index in the same cache.
At least a configuration property would be needed to point the
CacheManager initialization to an Infinispan configuration file -
which in turn will lilkely point to a JGroups configuration file.
This configuration property could be global or "directory scoped" like
we do for other properties but that would be complex.

I'd suggest a single global CacheManager configuration - which will
trigger a CacheManager initialization in the SearchFactory - and have
different Directories be able to select the cache name and index name
they want to use;
(If two directories use the same cache and same index name they are
sharing the same index)
It would look like:

hibernate.search.infinispan_configuration lucene-cluster-conf.xml
hibernate.search.default.directory_provider
org.hibernate.search.store.InfinispanDirectoryProvider
hibernate.search.default.cache_name defaultLuceneIndexes
hibernate.search.Animal.cache_name AnimalsLuceneIndex

Sanne



More information about the hibernate-dev mailing list