An open API service indexing awesome lists of open source software.

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

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
----