Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2454

Change ModeShape's Wildfly/AS kit to start using Infinispan as a regular library not as a subsystem

    Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 4.2.0.Final
    • Fix Version/s: 4.3.0.Final
    • Component/s: Server
    • Labels:
      None

      Description

      History

      Ever since ModeShape 3, the ModeShape Wildfly/JBossAS kit was based on ModeShape using the Infinispan & JGroups subsystems delivered with Wildfly/JBossAS. This made it possible to configure, monitor, and manage ModeShape, Infinispan, and JGroups via the Wildfly/JBossAS tools. However, this also required ModeShape to be "tied" (compatibility wise) to whatever version of Infinispan & JGroups delivered by Wildfly/JBossAS. So even though the Infinispan community moves more rapidly and offers bug fixes and enhancements, ModeShape could only make use of these once Wildfly incorporates these versions of Infinispan.

      Moreover, according to the Wildfly team, the Infinispan & JGroups subsystems are not meant to be used by third parties, but only internally by server components.

      Moving away from the Infinispan subsystem in Wildfly/AS

      Rather than rely upon the JGroups and Infinispan subsystems within the Wildfly server, the ModeShape kit for Wildfly will instead provide its own versions of the Infinispan & JGroups JARs as regular libraries (via modules). The ModeShape community can then release ModeShape using the latest stable version of Infinispan, regardless of the Infinispan version included in Wildfly.

      This change will not affect any embedded or non-Wildfly deployments of ModeShape, nor will it change any runtime behavior of ModeShape repositories running within Wildfly. It will, however, change how repositories are configured when ModeShape is used within Wildfly.

      Changes for users/administrators

      Repository and cache configurations

      Currently, repositories and caches in Wildfly are configured entirely within the standalone.xml (or similar) file:

        <cache-container name="modeshape" default-cache="sample" module="org.modeshape">
          <local-cache name="sample">
          ....
        </cache-container>
        ...
       <repository name="sample" 
          cache-name="sample" 
          cache-container="modeshape">
          ....
        </repository>
      

      After this change, the repository will still be defined in the subsystem:

      <repository name="sample" 
        cache-config="modeshape/sample-cache-config.xml"
        relative-to="jboss.server.data.dir"
      >
      

      but instead points to separate Infinispan configuration files (such as sample-cache-config.xml in the example above) defined on the file system:

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
                  xmlns="urn:infinispan:config:6.0">
          <global>
              <globalJmxStatistics enabled="false" allowDuplicateDomains="true"/>
          </global>
          <namedCache name="sample">
         ....
      

      So essentially users will have to provide regular Infinispan & JGroups configuration files which are then placed inside the server default folder structure so they can be found and read by ModeShape.

      Infinispan Binary Stores

      The Infinispan caches for binary stores will likewise be defined in external Infinispan configuration files. In fact, it is possible to define all of the caches needed by a repository (or even for several repositories) in a single Infinispan configuration file.

      Clustering

      Up until now, when clustering ModeShape repositories users would configure the AS/Wildfly Infinispan & JGroups subsystems. This will now require configuring clustering outside of Wildfly, again via regular Infinispan & JGroups XML configuration files placed inside the server directory structure:

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
                  xmlns="urn:infinispan:config:6.0">
          <global>
              <transport clusterName="modeshape-cluster">
                  <properties>
                      <property name="configurationFile" value="${jboss.server.config.dir}/modeshape/jgroups-test-config.xml" />
                  </properties>
              </transport>
          ...
      

      and the jgroups-test-config.xml:

      <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns="urn:org:jgroups"
              xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
          <TCP bind_port="0"
               recv_buf_size="${tcp.recv_buf_size:5M}"
               send_buf_size="${tcp.send_buf_size:5M}"
      ....
      

      All ModeShape clustering functionality will be the same; only the configuration will be different. This approach is much more akin to clustering Infinispan caches in any embedded environment.

      CLI

      It will no longer be possible to use the CLI to defining cache containers & caches. Once appropriate Infinispan and JGroups configuration files are present, one still can use the CLI to configure or adjust a repository configuration (since that's still defined in the ModeShape subsystem).

      Domain Mode

      Users can still rely upon Wildfly domain mode for clustering server instances to manage and monitor a group of servers. But as discussed above, ModeShape will no longer use the managed Infinispan and JGroups subsystems, and instead administrators will have to adjust the Infinispan and JGroups configuration files on each individual server.

      Monitoring

      Since there will be no Infinispan subsystem anymore, the monitoring will be available via the default Infinispan JMX support

      Older versions

      This feature will not be backported to older versions of ModeShape.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hchiorean Horia Chiorean
                  Reporter:
                  hchiorean Horia Chiorean
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: