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

相关推荐
hweiyu0010 小时前
Redis命令:LLEN
redis·缓存
用户0942485680314 小时前
第3章:Redis字符串 String 实战:验证码、计数器与分布式开关
redis·源码
VX_bysjlw98514 小时前
基于协同过滤的美食推荐系统的设计与实现32221-计算机毕设原创(免费领源码+带部署教程)
java·spring boot·redis·mysql·tomcat·maven·mybatis
hweiyu0016 小时前
Redis命令:RPUSHX
redis·缓存
星夜孤帆18 小时前
Redis缓存击穿与分布式锁实战:专栏目录、源码与实验说明
redis·分布式·缓存
clz131452119 小时前
ruoyi-cloud功能开发demo实战:三级联动 Redis Hash 缓存查看器
redis·缓存·哈希算法
xiaoqiMikko2 天前
Redis 实战(二):宕机会丢多少数据 —— kill -9 与真断电下 RDB / AOF 逐个实测(6.2.4)
redis·后端
夕除2 天前
redis--ziplist
redis
2301_32241428042 天前
基于SSM框架的在线考试管理系统的设计与实现14750-计算机毕设 原创(免费领源码+部署教程+开发环境)
java·redis·mysql·tomcat·maven·mybatis·ssm