Skip to content

Migration Guide

This section outlines the steps and strategies for migrating to the Valkey GLIDE Jedis Compatibility Layer.

The migration can be done by simply replacing the jedis dependency with valkey-glide-jedis-compatibility.

dependencies {
implementation 'redis.clients:jedis:5.1.5'
implementation group: 'io.valkey', name: 'valkey-glide-jedis-compatibility', version: '2.+', classifier: 'osx-aarch_64'
}

After updating the dependency, your existing Jedis code should compiles without modification as the compatibility layer is a drop-in replacement for Jedis.

import redis.clients.jedis.Jedis;
// This code compiles without needing changes
Jedis jedis = new Jedis();
jedis.set("key", "value");
String result = jedis.get("key");

After migration, it is crucial to throughly evaluate your application to ensure compatibility and stability.

  1. Test All Code Paths: Do not rely on successful compilation. Test every part of your application that interacts with Jedis, not just simple get/set operations.
  2. Monitor for Runtime Exceptions: Specifically watch for errors from unsupported or stubbed methods.
  3. Start with simple operations: Keep it simple first by verifying basic compatibility.
  1. Audit your codebase for unsupported features. See our Supported Features section for details.
  2. Test thoroughly in a development environment.
  3. Review connection configurations for compatibility. See our Connection Mapping page on how Jedis configurations are mapped to Valkey GLIDE configurations.
  4. Plan for feature gaps that may require code changes.
  5. Check your Jedis version as the compatibility layer may not support older Jedis versions.
  6. Verify command types. sendCommand() only supports Protocol.Command types, not custom ProtocolCommand implementations.
  7. Test thoroughly since classes may exist but lack implementation.
  8. Expect runtime failures.:Successful compilation doesn’t guarantee runtime success.
  9. Review SSL/TLS configurations. Advanced SSL settings require manual migration to native Valkey GLIDE APIs.
  1. Start with simple applications using basic commands.
  2. Gradually migrate complex features to native Valkey GLIDE APIs.
  3. Consider using Valkey GLIDE to support unsupported features.
  4. Monitor performance and behavior differences.

If your application relies heavily on unsupported features or you want the maximum performance and features of GLIDE, consider a manual migration directly to the native API.