This is a simple example that demonstrates putting values into a replicated region and retrieving the values using the Geode REST API. For enabling the REST API you can follow the official document.
This example assumes you have installed Java and Geode.
geode-examples/rest directory, build the example and run unit tests
$ ../gradlew build
Next start the locator and two servers
$ gfsh run --file=scripts/start.gfsh
Run the example to create and get entries using HTTP Java Client from the region
$ ../gradlew run
Shut down the system:
$ gfsh run --file=scripts/stop.gfsh