Comments (11)
Costin,
An api change.
Can you help convince me by giving me examples of what sort of keys you can not use right now?
And what sort of gymnastics (Romania :) are you willing to go through in terms of switching between semantic e.g. pure binary or classic String, interfaces to JRedis in your code?
Thank you for you feedback.
from jredis.
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.
As for my usage, in Spring Data we give the choice to the user. There's no 'semantic' switch - Strings again are just byte[] with a range of chars (encoding). You can just as well save your objects as XML/Json or use Java Serialization just to name a few options.
We always use the binary API , it's the most generic one. In case of JRedis, we go through the gymnastics of encoding the binary data all the time (base64) which is no surprise, kills performance.
from jredis.
Understood about the encoding but needed use-cases: crypto-keys. convinced me.
from jredis.
Redis 2.2.n client.
branch: master
commit: 956a874
from jredis.
That was fast! Thanks - by the way, are there any nightly snapshots for JRedis?
from 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.
from jredis.
Hi,
I've started testing the code and found the following issues:
a. List is still used as a return type on JRedis (by keys() and keys(K keys)).
b. mget uses Strings instead of byte[]
c. KeyValueSet uses String as a key
d. list/set/zset operations such as sdiff and sunion are still String based
e. hash operations (i.e. hset) use String for a field (instead of K)
from jredis.
Hi, thanks for catching that.
btw, I gather (please confirm) that at least on your end async ops are not supported?
from jredis.
There is work to add support for delayed results. Not sure whether this is what you meant by "async ops"...
from jredis.
https://github.com/alphazero/jredis/blob/master/core/api/src/main/java/org/jredis/JRedisFuture.java
from jredis.
Issue GH-47 (wip) -- sunion, sunionstore, sdiff and sdiffstore (future
commit de5a329
Issue GH-47 (wip) -- sinterstore (future was written) -- TESTED
commit 0a0f70c
Issue GH-47 (wip) -- sinter() (future was written) TESTED.
commit 079367c
Issue GH-47 (wip) -- rest of the hash methods.
commit 1e8e3a3
Issue GH-47 (wip) -- hset binary support. (Future was written.)
commit d1a74c7
Issue GH-47 (wip) -- KeyValueSet and co. (that was 'fun' ..) -- TESTED
commit 8c9f4a4
Issue GH-47 (wip) -- keys() and mget binary support. (The future was
commit cf65061
from jredis.
Related Issues (20)
- Expecting status code for size/count HOT 1
- Infinitive loop on reconnect (disconnect errors) HOT 3
- Connection re-established but last request not processed HOT 1
- java.util.concurrent.ExecutionException: Provider ExceptionBug? Expecting status code for size/count HOT 5
- add support for pub/sub
- add support for hashes HOT 2
- add support for 2.2 (new unified request protocol) HOT 1
- invalid pom.xml configuration HOT 2
- pooling support & logging
- missing redis operations
- Build Failure HOT 2
- jreids ZINTERSTORE , ZUNIONSTORE wrong result HOT 2
- Occasional exception: org.jredis.connector.ConnectionReset: Connection re-established but last request not processed: in.read returned -1 HOT 10
- JRedis: specifying encoding for String opterations HOT 1
- can't call "sadd" sequentially HOT 1
- JRedisClient-tests error HOT 2
- Runtime Exception HOT 1
- ERR Protocol error: expected '$' got '*' on mset HOT 2
- Add support for time command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jredis.