Announcement Announcement Module
Collapse
No announcement yet.
migrating from peer-to-peer to client-server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • migrating from peer-to-peer to client-server

    Hi,

    I am new to gemfire and need some assistance with this task. Our current configuration is peer-to-peer and we need to migrate to client-server topology. I would like to know what I need to change in configuration and/or code to migrate the current setup to use client-server topology..


    HTML Code:
      <!-- Gemfire Properties -->
      <util:properties id="gemfire-pr">
        <prop key="log-level">fine</prop>
        <!-- <prop key="start-locator">localhost[10111]</prop> -->
        <prop key="mcast-port">0</prop>
      </util:properties>
    
      <!-- Gemfire Cache -->
      <gfe:cache properties-ref="gemfire-pr" />
    
      <gfe:replicated-region id="IssueRegion"
        multicast-enabled="false" close="true">
        <gfe:cache-listener ref="IssuePublisher" />
        <gfe:cache-loader ref="IssueDBLoader" />
        <gfe:cache-writer ref="IssueDBWriter" />
      </gfe:replicated-region>
    
      <!-- Cache Listener -->
      <bean id="IssuePublisher"
        class="service.impl.IssuePublisherImpl" />
    
      <!-- Spring GemfireTemplate -->
      <bean id="IssueGemfireTemplate" class="org.springframework.data.gemfire.GemfireTemplate">
        <property name="region" ref="IssueRegion" />
      </bean>
    
      <bean id="IssueDBLoader" class="cache.IssueDBLoader" />
      <bean id="IssueDBWriter" class="cache.IssueDBWriter" />

    A locator was created for us on the network using the following xml but not sure if they are missing anything
    HTML Code:
    <!DOCTYPE cache PUBLIC "-//GemStone Systems, Inc.//GemFire Declarative Cache 7.0//EN" "http://www.gemstone.com/dtd/cache7_0.dtd">
    <cache lock-lease="120" lock-timeout="60" search-timeout="300" is-server="false" copy-on-read="false">
    
    </cache>

    I tried using the client-cache tags and pool but keep getting GemfireTemplate errors.

  • #2
    I suggest you start by looking at this https://github.com/SpringSource/spri...cator-failover. Re starting a locator, the cache.xml above has nothing to do with the locator. A locator is a separate service from a cache server. Every member in the distributed system must register with the locator. On the client side, using a pool. On the server side, using properties. Normally locators are started from the command line, using gfsh or using the bin/GemFire scripts provided with the full GemFire install., e.g. , gemfire start-locator. The spring-gemfire-examples project above includes Java code to start and stop a locator, appropriate for testing. The instructions are https://github.com/SpringSource/spri...nced/README.md but the API used basically delegates to the shell scripts in $GEMFIRE_HOME. So you need to have GemFire installed locally.

    Comment


    • #3
      Thanks for the quick response. I have tried the examples that come with the install of gemfire, both peer to peer and client-server, but it does not seem to help plan a migration path from peer-to-peer to a client-server instance. Based on the configuration that I have given before, what should configuration for client-sever look like?
      Currently, the listener, DBloader and DBwriters are all in one war, will that need to be packaged separately to publish to the server? Is it not possible to have the listener, DBloader and DBwriters, as they are today, in the client and use the server for caching data only?

      Please let me know if you need more details of our setup.

      Cheers,

      Sameer Jaffer

      Comment


      • #4
        Good tutorials,I think this is good way for learning.Thanks for sharing information,your information increase my knowledge.Your information very helpful for me.

        Comment

        Working...
        X