3 Replies Latest reply on May 20, 2013 2:55 AM by Tristan Tarrant

    Remote guiDemo Distributed Cache

    Kalin Wilson Newbie

      Hi,

      I'm evaluating Infinispan 5.2. I've downloaded the -All distro and played around with guiDemo, trying different cluster modes, etc. That went well.

       

      We will most likely be using Infinispan as a remote distributed cache that several processes will connect to. These client processes may or may not have a local/near cache.

      Before starting to prototype my own code, I thought I'd try to set up a remote cache by running several instances of guiDemo plus a hotrod server that all use the same config file. I then connect to the hotrod server with the CLI (ispn-cli.sh) via JMX. I can interact with the server cache instance, but the server and guiDemo instances don't see each other or don't join the same cluster. This is all being run on the same machine.

       

      The server and guiDemo processes are using etc/config-samles/gui-demo-cache-config.xml, slightly modified as follows:

       

      {code:xml}

      <infinispan

            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

            xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd"

            xmlns="urn:infinispan:config:5.2">

        

         <global>

            <transport clusterName="demoCluster"/>

            <globalJmxStatistics enabled="true"/>

         </global>

       

         <default>

            <jmxStatistics enabled="true"/>

            <clustering mode="distribution">

               <l1 enabled="true" lifespan="60000"/>

               <hash numOwners="2" />

               <sync/>

            </clustering>

         </default>

       

         <namedCache name="Cache1">

            <clustering mode="distribution">

               <sync/>

               <hash numOwners="2"/>

               <l1 enabled="true" lifespan="600000" />

            </clustering>

         </namedCache>

      </infinispan>

      {code}

       

      I start the server with this command line:

       

      {code}./startServer.sh -r hotrod -c ../etc/config-samples/gui-demo-cache-config.xml{code}

       

      I start the cli client with this command line (after getting jmx port from jsp):

       

      {code}./ispn-cli.sh -c //localhost:18246/DefaultCacheManager/Cache1{code}

       

      What else do I need to do or what should I be doing differently? Will guiDemo support joining with a server instance?

       

      Ideally, if I get this working, I want to run guiDemo on two or more machines on the same network for a more realistic distributed cache.

       

      Thanks!

       

      Kalin