Migration Guide
This section outlines the steps and strategies for migrating to the Valkey GLIDE Jedis Compatibility Layer.
Instructions
Section titled “Instructions”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'}# TODO: Add Maven exampleAfter 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 changesJedis jedis = new Jedis();jedis.set("key", "value");String result = jedis.get("key");Testing Your Application
Section titled “Testing Your Application”After migration, it is crucial to throughly evaluate your application to ensure compatibility and stability.
- Test All Code Paths: Do not rely on successful compilation. Test every part of your application that interacts with Jedis, not just simple
get/setoperations. - Monitor for Runtime Exceptions: Specifically watch for errors from unsupported or stubbed methods.
- Start with simple operations: Keep it simple first by verifying basic compatibility.
Migration Checklist
Section titled “Migration Checklist”- Audit your codebase for unsupported features. See our Supported Features section for details.
- Test thoroughly in a development environment.
- Review connection configurations for compatibility. See our Connection Mapping page on how Jedis configurations are mapped to Valkey GLIDE configurations.
- Plan for feature gaps that may require code changes.
- Check your Jedis version as the compatibility layer may not support older Jedis versions.
- Verify command types.
sendCommand()only supportsProtocol.Commandtypes, not customProtocolCommandimplementations. - Test thoroughly since classes may exist but lack implementation.
- Expect runtime failures.:Successful compilation doesn’t guarantee runtime success.
- Review SSL/TLS configurations. Advanced SSL settings require manual migration to native Valkey GLIDE APIs.
Migration Strategies
Section titled “Migration Strategies”- Start with simple applications using basic commands.
- Gradually migrate complex features to native Valkey GLIDE APIs.
- Consider using Valkey GLIDE to support unsupported features.
- Monitor performance and behavior differences.
Manual Migration
Section titled “Manual Migration”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.
Manual Migration Migrate from Jedis to Valkey GLIDE using native APIs for full feature support.