From dd76c6655296819685c393eb85394f8b0565f18d Mon Sep 17 00:00:00 2001 From: kiro-agent Date: Sun, 26 Jul 2026 08:39:21 +0000 Subject: [PATCH] docs: add Jedis 4.x compatibility layer migration guide Signed-off-by: kiro-agent --- astro.config.mjs | 9 + .../docs/migration/java/jedis/index.mdx | 4 +- .../configurations-mapping.mdx | 104 ++++++++ .../jedis-4-compatibility-layer/index.mdx | 80 +++++++ .../instructions.mdx | 225 ++++++++++++++++++ .../supported-features.mdx | 118 +++++++++ 6 files changed, 539 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/configurations-mapping.mdx create mode 100644 src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/index.mdx create mode 100644 src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/instructions.mdx create mode 100644 src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/supported-features.mdx diff --git a/astro.config.mjs b/astro.config.mjs index 9bda7bc7..6d48830b 100755 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -226,6 +226,15 @@ export default defineConfig({ "migration/java/jedis/jedis-compatibility-layer/configurations-mapping", ], }, + { + label: "Jedis 4.x Compatibility Layer", + items: [ + "migration/java/jedis/jedis-4-compatibility-layer", + "migration/java/jedis/jedis-4-compatibility-layer/instructions", + "migration/java/jedis/jedis-4-compatibility-layer/supported-features", + "migration/java/jedis/jedis-4-compatibility-layer/configurations-mapping", + ], + }, { label: "Manual Migrations", items: [ diff --git a/src/content/docs/migration/java/jedis/index.mdx b/src/content/docs/migration/java/jedis/index.mdx index 1389d83b..19b0de60 100644 --- a/src/content/docs/migration/java/jedis/index.mdx +++ b/src/content/docs/migration/java/jedis/index.mdx @@ -10,6 +10,8 @@ import { Aside, LinkCard } from '@astrojs/starlight/components'; #### Looking to migrate from Jedis? - + + + diff --git a/src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/configurations-mapping.mdx b/src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/configurations-mapping.mdx new file mode 100644 index 00000000..f449737b --- /dev/null +++ b/src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/configurations-mapping.mdx @@ -0,0 +1,104 @@ +--- +title: Configuration Mapping +description: Configuration mapping between Jedis 4.x and the GLIDE Jedis 4.x Compatibility Layer. +sidebar: + order: 4 + +--- + +import { Aside } from '@astrojs/starlight/components'; + +This page describes how Jedis 4.x configuration parameters map to Valkey GLIDE configuration when using the Jedis 4.x Compatibility Layer. + +## Configuration Overview + +The following Jedis 4.x configuration parameters are: + +* **Successfully Mapped**: user, password, clientName, ssl, connectionTimeoutMillis, socketTimeoutMillis, database. +* **Accepted but Ignored**: redisProtocol (always RESP2), pool configuration values. +* **Not Supported**: Custom SSLSocketFactory, HostnameVerifier, keystore/truststore, cipher suites, TLS protocol versions, client-auth, AuthXManager, custom RedisCredentialsProvider. + +## Parameter Mappings + +### `DefaultJedisClientConfig` Parameters + +| Jedis 4.x Parameter | GLIDE Mapping | Notes | +|---|---|---| +| `user` | `ServerCredentials.username` | Fully supported | +| `password` | `ServerCredentials.password` | Fully supported | +| `clientName` | `BaseClientConfiguration.clientName` | Fully supported | +| `ssl` | `BaseClientConfiguration.useTLS` | System trust store only | +| `connectionTimeoutMillis` | `AdvancedBaseClientConfiguration.connectionTimeout` | Fully supported | +| `socketTimeoutMillis` | `BaseClientConfiguration.requestTimeout` | Fully supported | +| `database` | Handled via SELECT command after connection | Fully supported | +| `redisProtocol` / `getRedisProtocol()` | Ignored | Always RESP2; exists for source compatibility | + +### Pool Configuration Parameters + + + +| Jedis 4.x Pool Parameter | GLIDE Behavior | +|---|---| +| `maxTotal` | Ignored — GLIDE manages pool size internally | +| `maxIdle` | Ignored | +| `minIdle` | Ignored | +| `maxWaitMillis` | Ignored | +| `testOnBorrow` | Ignored | +| `testOnReturn` | Ignored | +| `testWhileIdle` | Ignored | +| `timeBetweenEvictionRunsMillis` | Ignored | +| `numTestsPerEvictionRun` | Ignored | +| `minEvictableIdleTimeMillis` | Ignored | +| `blockWhenExhausted` | Ignored | + +### Pool Type Differences + +| Client | Jedis 4.x Pool Type | Jedis 5.x Pool Type | +|---|---|---| +| `JedisPool` | `GenericObjectPoolConfig` | `GenericObjectPoolConfig` | +| `JedisPooled` | `GenericObjectPoolConfig` | `GenericObjectPoolConfig` | + +Both types are accepted by this compatibility layer and both are ignored internally. + +## SSL/TLS Configuration + +### Supported + +| Configuration | Example | +|---|---| +| Enable TLS (system trust store) | `DefaultJedisClientConfig.builder().ssl(true).build()` | +| `rediss://` URI scheme | `new JedisPooled("rediss://localhost:6380")` | +| Insecure mode (testing only) | `SslOptions.builder().sslVerifyMode(SslVerifyMode.INSECURE).build()` | + +### Not Supported (throws `JedisConfigurationException`) + +| Configuration | Alternative | +|---|---| +| Custom `SSLSocketFactory` | Use system trust store or native GLIDE config | +| Custom `HostnameVerifier` | Use system trust store or `SslVerifyMode.INSECURE` for testing | +| Keystore / truststore on `SslOptions` | Install certificates in the system trust store | +| Custom cipher suites | GLIDE auto-selects secure ciphers | +| TLS protocol version selection | GLIDE auto-selects TLS 1.2+ | +| Client-auth flags on `SSLParameters` | Use username/password authentication | + +## Cluster Configuration + +### `JedisCluster` Constructor Parameters + +| Parameter | GLIDE Mapping | Notes | +|---|---|---| +| `Set nodes` | Cluster node addresses | Fully supported | +| `connectionTimeout` | Connection timeout | Fully supported | +| `soTimeout` | Socket/request timeout | Fully supported | +| `maxAttempts` | Retry configuration | Mapped to GLIDE retry strategy | +| `password` | Authentication credentials | Fully supported | +| `clientName` | Client name | Fully supported | + +## Key Migration Insights + +1. **Pool configuration doesn't matter**: GLIDE's internal connection management is optimized and ignores pool settings. This is usually an improvement over manually tuned pools. +2. **Protocol is always RESP2**: The `.protocol()` method exists for source compatibility with shared config types, but GLIDE always negotiates RESP2 in this layer. For RESP3, use the Jedis 5.x layer. +3. **SSL simplified**: GLIDE uses system certificate stores with secure defaults (TLS 1.2+, modern cipher suites). Custom SSL configuration must be migrated to system-level trust or to native GLIDE APIs. +4. **Timeouts map directly**: Connection and socket timeouts are mapped to GLIDE's equivalent timeout settings with the same semantics. diff --git a/src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/index.mdx b/src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/index.mdx new file mode 100644 index 00000000..ceafc053 --- /dev/null +++ b/src/content/docs/migration/java/jedis/jedis-4-compatibility-layer/index.mdx @@ -0,0 +1,80 @@ +--- +title: Overview +description: Learn how the Valkey GLIDE Jedis 4.x Compatibility Layer enables seamless migration from Jedis 4.x to Valkey GLIDE with minimal or no code changes. +sidebar: + order: 1 + +--- + +import { Aside, LinkCard } from '@astrojs/starlight/components'; + +The Valkey GLIDE Jedis 4.x Compatibility Layer is a **drop-in replacement** that enables seamless migration from Jedis 4.x applications to Valkey GLIDE with minimal or no code changes. + +It implements the Jedis 4.x API while using the high-performance Valkey GLIDE client underneath. This allows existing Jedis 4.x applications to benefit from GLIDE's modern architecture without a complete rewrite. + +