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就可以访问。

相关推荐
步十人18 小时前
【Redis】持久化机制
数据库·redis·缓存
yurenpai(27届找实习中)19 小时前
redis_点评(25.附件店铺—把数据库里的店铺按【类型分组】,批量导入Redis 的 GEO 地理位置结构)
java·redis·缓存
闪电悠米19 小时前
黑马点评-优惠券秒杀-05_local_lock_cluster_problem
java·spring boot·redis·缓存
西安邮电大学20 小时前
Redis为什么快?
java·redis·后端·其他·面试
稚枭天卓20 小时前
mac 安装 redis
redis·macos
yurenpai(27届找实习中)21 小时前
redis_点评(26.附近店铺——实现附近商家功能)
数据库·spring boot·redis
不剪发的Tony老师21 小时前
RedisME:一个现代化、轻量级Redis管理工具
数据库·redis
消失的旧时光-194321 小时前
企业认证与安全体系(四):企业登录认证流程全解析——JWT、Redis、Spring Security 如何协同工作?
redis·安全·spring·spring security·jwt
愤怒的苹果ext21 小时前
Spring Boot Redis Stream队列
spring boot·redis·消息队列·stream
MageGojo1 天前
短链还原 API 怎么接入:展开跳转链路、查看状态码和最终落地页
数据库·redis·缓存