jedis,lettuce,redisson对比

jedis是一个老牌的java的redis客户端,仅支持同步的方式连接,redis官网有一句这样的话

Jedis is a synchronous Java client for Redis. Use Lettuce if you need a more advanced Java client that also supports asynchronous and reactive connections。

官方也推荐如果需要异步或者响应式的支持,可以使用lettuce。下面摘抄一下 lettuce官网的介绍

Lettuce is a scalable thread-safe Redis client for synchronous, asynchronous and reactive usage. Multiple threads may share one connection if they avoid blocking and transactional operations such as BLPOP and MULTI/EXEC. Lettuce is built with netty. Supports advanced Redis features such as Sentinel, Cluster, Pipelining, Auto-Reconnect and Redis data models。

总结一下就是lettuce底层使用netty进行通信,是线程安全的,并且支持异步和响应式编程,在高并发的情况下,效率会更高。

再来看下redisson的官方介绍

Redisson is the Java Client and Real-Time Data Platform for Redis or Valkey. Providing the most convenient and easiest way to work with Redis or Valkey. Redisson objects provide an abstraction layer between Redis or Valkey and your Java code, which allowing maintain focus on data modeling and application logic

redisson对分布式的锁,集合提供了更好的支持,通过一些简单的api就可以访问。

相关推荐
MAGICIAN...1 小时前
【Redis五种数据类型】
数据库·redis·缓存
吐泡泡_1 小时前
Redis(主从复制)
redis
凯子坚持 c3 小时前
Redis核心通用命令深度解析:结合C++ redis-plus-plus 实战指南
c++·redis·log4j
往事随风去3 小时前
Redis的内存淘汰策略(Eviction Policies)有哪些?
redis·后端·算法
酷ku的森6 小时前
Redis中的Zset数据类型
数据库·redis·缓存
Heliotrope_Sun14 小时前
Redis
数据库·redis·缓存
boonya16 小时前
Redis核心原理与面试问题解析
数据库·redis·面试
上官浩仁17 小时前
springboot redisson 缓存入门与实战
spring boot·redis·缓存