-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
full binary support #47
Comments
Costin, An api change. Can you help convince me by giving me examples of what sort of keys you can not use right now? Thank you for you feedback. |
A string is a byte[] array with a certain encoding. So storing data that falls outside the encoding range (think dealing with i18n and multiple encodings inside the same app and thus db), thumbnails or crypto keys simply doesn't work unless doing all sort of unneeded tricks to fit the data into the String. Change the JVM encoding and you have to start over. Redis is binary safe and libraries such as Jedis support this natively. |
Understood about the encoding but needed use-cases: crypto-keys. convinced me. |
Review changes in test suite to pin point the API methods that are no longer backwards compatible. These are a tiny subset of commands that would return a key (not a value), such as RANDOMKEY. Instead of returning String, they now return byte[]. All other API changes are backwards compatible so this should be of minimal pain to existing applications.
Redis 2.2.n client. |
That was fast! Thanks - by the way, are there any nightly snapshots for JRedis? |
no plans for nightly snapshots. you guys could help out by running your binary tests against the latest. I did a very trivial test in the hello redis example. The rest of the test suite is still using String keys so do let me know if you see any issues. Specially helpful would be hash tests. |
Hi, I've started testing the code and found the following issues: |
Hi, thanks for catching that. btw, I gather (please confirm) that at least on your end async ops are not supported? |
There is work to add support for delayed results. Not sure whether this is what you meant by "async ops"... |
per existing regression tests but this really needs to be banged on.
Introduced new DefaulCode.toDataDictionary() helper method to convert Map<byte[] ,byte[]> to Map<String, byte[]>. (See affected tests for usage examples.) Tested.
Issue GH-47 (wip) -- sunion, sunionstore, sdiff and sdiffstore (future Issue GH-47 (wip) -- sinterstore (future was written) -- TESTED Issue GH-47 (wip) -- sinter() (future was written) TESTED. Issue GH-47 (wip) -- rest of the hash methods. Issue GH-47 (wip) -- hset binary support. (Future was written.) Issue GH-47 (wip) -- KeyValueSet and co. (that was 'fun' ..) -- TESTED Issue GH-47 (wip) -- keys() and mget binary support. (The future was |
Currently JRedis provides binary support for values but not for keys. Since Redis 2.0 uses binary-safe strings, such a feature will help greatly for storing data in binary format.
The text was updated successfully, but these errors were encountered: