Safe async movement
What movement is safe async? Is reading or publishing safe in async?
@andreasdc Could you please elaborate your question?
@andreasdc Could you please elaborate your question?
For example it's not safe to have saving async, because my database was broken often. So my question is what's safe to do async, for example getting keys or publishing?
Hi @andreasdc any chance you can give an example of a command or commands that were causing you an issue? A code sample would be a great place to start.
Hi @andreasdc any chance you can give an example of a command or commands that were causing you an issue? A code sample would be a great place to start.
What do you mean? I often use hset, hget, problem with messed database I had long time ago, but I saw that jedis shouldn't be accessed async. I just found this information in an article: "Jedis is all synchronous with the exception of pipelines. Pipelines allow asynchronous usage of Redis but, unfortunately, cannot be used alongside clustering." (https://redis.com/blog/jedis-vs-lettuce-an-exploration/)
@andreasdc Thanks for sharing. There are things that have been changed. Here a few points:
- ONLY the
Jedisclass shouldn't be accessed async. But there are other classes. - JedisPool allows async operations[1].
- Newly introduced JedisPooled does almost the same thing in a much more convenient way.
- JedisCluster allows async operations[1] in cluster mode.
- Newly introduced ClusterPipeline allows pipelining in cluster mode.
Note: [1] not to be confused with async socket operations.