I am currently in the process of working on an early prototype for an application we will be developing later this year. The application's data model and query needs are a natural fit for JCR and after evaluating both ModeShape and JackRabbit we have come to the conclusion ModeShape best meets our needs.
Given the timeframe of the application and the exciting developments happening in ModeShape 4 we are looking to architect our application based on features in ModeShape 4. One of the challenges with this is that ModeShape 4 is still in the early stages of development and a lot of the documentation and existing solutions are focused on the 3.X version.
While I understand that everyones requirements are different and there is not a 'one size fits all' solution what I am hoping to achieve is to pull together a list of best practices and some example configuration files for deploying a ModeShape 4.0 in a cluster using Wildfly 8.0 and the ModeShape subsystem. These best practices will be based on the planned ModeShape 4.0 feature set and not the existing feature set, which means not all of this will be possible with the current alpha releases. I plan to share this information on this forum to help other people looking into this.
Given this I have a number of questions around new features (including those that are still being developed) in 4.0 and how best to take advantage of them.
1. Based on previous discussions (see https://community.jboss.org/message/871616#871616) it looks like a good starting point for managing indexes in a cluster is for each server in the cluster to maintain it's own local index (although there are some advantages to having a master index and using JMS to update it or using an external index provider). Currently in looks like ModeShape 4 is going to initially offer support for local file system and local Lucene indexes. Given this:
a) What are the pro/cons for using the a file system Vs. Lucene? Is there any documentation that discusses this?
b) How do you configure indexes using the Wildfly subsystem?
c) Will it be possible to migrate indexes from local to an external index provider?
2. Based on the 4.0 documentation and standalone-modeshape-ha.xml shipped with the wildfly subsystem it looks like all persistence storage and clustering is now configured via Infinispan, and the Modeshape configuration just references the cache-container and cache to use. Given the complexity and learning curve associated with configuring Infinispan it would be good to provide some guides and example of some common configurations that work well with ModeShape that go beyond a basic local or replicated cache that uses a file store. In order to put together some examples I have some questions (although some of these might be more relevant for the Infinispan forums it would be good to look at them from the perspective of ModeShape).
a) Looking through the Inifinispan documentation it looks like there are large number of Cache Stores available given this variety of choice what are the most suitable choices for a ModeShape cluster (e.g. File, JDBC, LevelDB)?
b) What are the recommendations around shared Vs non-shared cache stores in a ModeShape cluster?
c) When configuring a Cache Store for use in a ModeShape cluster inside a Wildfly environment what is the best transaction level to use (NON_XA, FULL_XA, other)?
d) What are good defaults for the following cache store values when used in a ModeShape cluster and why:
- mode (sync vs async)
- JDBC cache loader type (if using a JDBC Cache Store)
- eviction strategy
- transaction locking mode
3. What are the best practices around configuring binary cache stores (data and metadata) in a ModeShape cluster?
Many thanks in advance for your help.