Skip to content

Simple Example of a GemFire Multi-Site configuration that you can run on a single machine, for learning

Notifications You must be signed in to change notification settings

eitansuez/simple-multisite

Repository files navigation

MultiSite w/GemFire

A simple example implementation of GemFire’s multi-site WAN topology, which can be run on a local machine, primarily for learning purposes.

Configuration

Site 1:

1 Locator (default port), 2 Servers, with Gateway Senders

Site 2:

1 Locator, 2 Servers, with Gateway Receivers

Steps

  1. Install Gradle

  2. Start first site’s cluster:

    cd site1
    ./start.sh
  3. In a separate console, start second site’s cluster:

    cd site2
    ./start.sh
  4. At this point you have the definition of one region: Customer on both clusters. You can log in to each cluster using gfsh, connect, and verify that the region exists, and can also list gateways.

    On "site1":
    gfsh
    connect
    list members
    list regions
    list gateways
    On "site2":
    gfsh
    connect --locator=localhost[20334]
    list members
    list regions
    list gateways
  5. Verify there’s no data in the region (on both clusters), with:

    query --query="select * from /Customer"
  6. On site2, a CacheListener is attached to the Customer region to log the event when a cache entry is created, updated, or deleted. So, in separate consoles, tail the server logs for site 2:

    tail -f site2/server1/server1.log
    tail -f site2/server2/server2.log
  7. Run a client to load a Customer object into the first cluster, and watch the cache listener on site2 notify you that it received a copy:

    cd client
    gradle dataload

About

Simple Example of a GemFire Multi-Site configuration that you can run on a single machine, for learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published