https://github.com/eitansuez/simple-multisite
Simple Example of a GemFire Multi-Site configuration that you can run on a single machine, for learning
https://github.com/eitansuez/simple-multisite
Last synced: about 1 year ago
JSON representation
Simple Example of a GemFire Multi-Site configuration that you can run on a single machine, for learning
- Host: GitHub
- URL: https://github.com/eitansuez/simple-multisite
- Owner: eitansuez
- Created: 2017-03-17T00:29:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-26T21:37:09.000Z (almost 9 years ago)
- Last Synced: 2025-02-26T01:27:03.834Z (over 1 year ago)
- Language: Java
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= 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
. Install Gradle
. Start first site's cluster:
+
----
cd site1
./start.sh
----
. In a separate console, start second site's cluster:
+
----
cd site2
./start.sh
----
. 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
----
. Verify there's no data in the region (on both clusters), with:
+
----
query --query="select * from /Customer"
----
. 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
----
. 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
----