I just announced the new Learn Spring course, focused on the fundamentals of Spring 5 and Spring Boot 2:

1. Overview

In this tutorial, we’ll cover Geode’s key concepts and run through some code samples using its Java client.

2. Setup

First, we need to download and install Apache Geode and set the gfsh environment. To do this, we can follow the instructions in Geode’s official guide.

And second, this tutorial will create some filesystem artifacts. So, we can isolate them by creating a temporary directory and launching things from there.

2.1. Installation and Configuration

From our temporary directory, we need to start a Locator instance:

gfsh> start locator --name=locator --bind-address=localhost

Locators are responsible for the coordination between different members of a Geode Cluster, which we can further administer over JMX.

Next, let’s start a Server instance to host one or more data Regions:

gfsh> start server --name=server1 --server-port=0

We set the –server-port option to 0 so that Geode will pick any available port. Though if we leave it out, the server will use the default port 40404. A server is a configurable member of the Cluster that runs as a long-lived process and is responsible for managing data Regions.

And finally, we need a Region:

gfsh> create region --name=baeldung --type=REPLICATE

The Region is ultimately where we will store our data.

2.2. Verification

Let’s make sure that we have everything working before we go any further.

8. Conclusion

In this article, we learned the basic concepts of the Apache Geode ecosystem. We looked at simple gets and puts with standard and custom types, replicated and partitioned regions, and oql and function support.