Getting Started
System Requirements
Section titled “System Requirements”The release of Valkey GLIDE was tested on the following platforms:
Linux:
- Ubuntu 20 (x86_64/amd64 and arm64/aarch64)
- Amazon Linux 2 (AL2) and 2023 (AL2023) (x86_64)
macOS:
- macOS 14.7 (Apple silicon/aarch_64)
- macOS 13.7 (x86_64/amd64)
Layout of Java code
Section titled “Layout of Java code”The Java client contains the following parts:
src: Rust dynamic library FFI to integrate with GLIDE core library.client: A Java-wrapper around the GLIDE core rust library and unit tests for it.benchmark: A dedicated benchmarking tool designed to evaluate and compare the performance of Valkey GLIDE and other Java clients.integTest: An integration test sub-project for API and E2E testing.
An example app (called glide.examples.ExamplesApp) is also available under examples app, to sanity check the project.
Supported Engine Versions
Section titled “Supported Engine Versions”Valkey GLIDE is API-compatible with the following engine versions:
| Engine Type | 6.2 | 7.0 | 7.1 | 7.2 | 8.0 | 8.1 | 9.0 |
|---|---|---|---|---|---|---|---|
| Valkey | - | - | - | V | V | V | V |
| Redis | V | V | V | V | - | - | - |
Prerequisites
Section titled “Prerequisites”Java Requirements
Minimum requirements: JDK 11 or later. Ensure that you have a minimum Java version of JDK 11 installed on your system:
echo $JAVA_HOMEjava -versionAdding the client to your project
Section titled “Adding the client to your project”Refer to https://central.sonatype.com/artifact/io.valkey/valkey-glide. Once set up, you can run the basic examples.
Additionally, consider installing the Gradle plugin, OS Detector to help you determine what classifier to use.
Classifiers
Section titled “Classifiers”There are 4 types of classifiers for Valkey GLIDE which are
osx-aarch_64osx-x86_64linux-aarch_64linux-x86_64// osx-aarch_64dependencies { implementation group: 'io.valkey', name: 'valkey-glide', version: '2.+', classifier: 'osx-aarch_64'}
// osx-x86_64dependencies { implementation group: 'io.valkey', name: 'valkey-glide', version: '2.+', classifier: 'osx-x86_64'}
// linux-aarch_64dependencies { implementation group: 'io.valkey', name: 'valkey-glide', version: '2.+', classifier: 'linux-aarch_64'}
// linux-x86_64dependencies { implementation group: 'io.valkey', name: 'valkey-glide', version: '2.+', classifier: 'linux-x86_64'}
// with osdetectorplugins { id "com.google.osdetector" version "1.7.3"}dependencies { implementation group: 'io.valkey', name: 'valkey-glide', version: '2.+', classifier: osdetector.classifier}<!-- osx-x86_64 --><dependency> <groupId>io.valkey</groupId> <artifactId>valkey-glide</artifactId> <classifier>osx-x86_64</classifier> <version>2.1.0</version></dependency>
<!-- osx-aarch_64 --><dependency> <groupId>io.valkey</groupId> <artifactId>valkey-glide</artifactId> <classifier>osx-aarch_64</classifier> <version>2.1.0</version></dependency>
<!-- linux-aarch_64 --><dependency> <groupId>io.valkey</groupId> <artifactId>valkey-glide</artifactId> <classifier>linux-aarch_64</classifier> <version>2.1.0</version></dependency>
<!-- linux-x86_64 --><dependency> <groupId>io.valkey</groupId> <artifactId>valkey-glide</artifactId> <classifier>linux-x86_64</classifier> <version>2.1.0</version></dependency>
<!-- with os-maven-plugin -->
<build> <extensions> <extension> <groupId>kr.motd.maven</groupId> <artifactId>os-maven-plugin</artifactId> </extension> </extensions></build><dependencies> <dependency> <groupId>io.valkey</groupId> <artifactId>valkey-glide</artifactId> <classifier>${os.detected.classifier}</classifier> <version>2.1.0</version> </dependency></dependencies>;// osx-aarch_64libraryDependencies += "io.valkey" % "valkey-glide" % "2.+" classifier "osx-aarch_64"
// osx-x86_64libraryDependencies += "io.valkey" % "valkey-glide" % "2.+" classifier "osx-x86_64"
// linux-aarch_64libraryDependencies += "io.valkey" % "valkey-glide" % "2.+" classifier "linux-aarch_64"
// linux-x86_64libraryDependencies += "io.valkey" % "valkey-glide" % "2.+" classifier "linux-x86_64"Setting up the Java module
Section titled “Setting up the Java module”To use Valkey GLIDE in a Java project with modules, include a module-info.java in your project.
For example, if your program is called App, you can follow this path
app/src/main/java/module-info.javaand inside the module it will specifically require the line
requires glide.api;
For example, if your project has a module called playground, it would look like this
module playground { requires glide.api;}