...
Apache Geode is a mature, robust technology originally developed by GemStone Systems. Commercially available as GemFire™, it was first deployed in the financial sector as the transactional, low-latency data engine used in Wall Street trading platforms. Today Apache Geode technology is used by hundreds of enterprise customers for high-scale business applications that must meet low latency and 24x7 availability requirements.
How to Get Apache Geode
You can download Apache Geode from the website, run a Docker image , or install with homebrew on OSX. Application developers can load dependencies from Maven Central .
Code Block | ||||
---|---|---|---|---|
| ||||
<dependencies>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-core</artifactId>
<version>$VERSION</version>
</dependency>
</dependencies> |
Code Block | ||||
---|---|---|---|---|
| ||||
dependencies {
compile "org.apache.geode:geode-core:$VERSION"
} |
Main
...
Concepts
...
and
...
Components
Caches are an abstraction that describe a node in a Geode distributed system.
...
Anchor | ||||
---|---|---|---|---|
|
How to Get Apache Geode
You can download Apache Geode from the website, run a Docker image, or install with homebrew on OSX. Application developers can load dependencies from Maven Central.
Code Block | ||||
---|---|---|---|---|
| ||||
<dependencies>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-core</artifactId>
<version>$VERSION</version>
</dependency>
</dependencies> |
Code Block | ||||
---|---|---|---|---|
| ||||
dependencies {
compile "org.apache.geode:geode-core:$VERSION"
} |
Start the cluster
Download Geode by following one of the methods described aboveDownload and install Geode binaries from http://geode.apache.org/releases/, and follow the installation instructions at in the posted manual at http://geode.apache.org/docs/.
...
Write a client application (this example uses a Gradle build script):
language | java |
---|---|
title | build.gradle |
Code Block | ||||
---|---|---|---|---|
| ||||
import java.util.Map; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.*; public class HelloWorld { public static void main(String[] args) throws Exception { ClientCache cache = new ClientCacheFactory() .addPoolLocator("localhost", 10334) .create(); Region<String, String> region = cache .<String, String>createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY) .create("hello"); region.put("1", "Hello"); region.put("2", "World"); for (Map.Entry<String, String> entry : region.entrySet()) { System.out.format("key = %s, value = %s\n", entry.getKey(), entry.getValue()); } cache.close(); } } |
...