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

    Remote guiDemo Distributed Cache

    kalinwilson

      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

        • 1. Re: Remote guiDemo Distributed Cache
          nadirx

          Kalin, first of all I'd recommend using the Infinispan Server distribution which we've started delivering with Infinispan 5.3 : it's a much better choice for remoting.

          5.3 also brings data interoperability between caches used by different protocols, so you can easily populate an embedded cache, and serve it's data over HotRod (something which was non-trivial before 5.3).

          1 of 1 people found this helpful
          • 2. Re: Remote guiDemo Distributed Cache
            kalinwilson

            Thanks Tristan. I realized upon further investigation that the GuiDemo nodes won't have servers embedded in them. I misunderstood how a remote cluster is formed.

            I'll look at the new distro server options. I was hoping to leverage the guiDemo data display capability for testing. I'm not sure if cache inspection is exposed via the RHQ plugin or not. I may extend guiDemo to embed a hotrod server to see if I can get what I was aiming for.

             

            Kalin

            • 3. Re: Remote guiDemo Distributed Cache
              nadirx

              Kalin, you can use the CLI for data inspection. Also Hawt will soon have an Infinispan view which will allow data manipulation.