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

相关推荐
huohuopro1 小时前
Redis安装和杂谈
数据库·redis·缓存
fengxin_rou2 小时前
从 String 到 Zset:Redis 核心数据结构全解析及排行榜应用
java·开发语言·redis·多线程
惊讶的猫2 小时前
redis数据淘汰策略
redis·缓存
睡美人的小仙女12711 小时前
Threejs加载环境贴图报错Bad File Format: bad initial token
开发语言·javascript·redis
徐同保11 小时前
解决 Vue 3 项目 TypeScript 编译错误:@types/lodash 类型定义不兼容
redis·网络协议·https
he___H13 小时前
Redis高级数据类型
数据库·redis·缓存
笨手笨脚の14 小时前
Redis: Thread limit exceeded replacing blocked worker
java·redis·forkjoin·thread limit
惊讶的猫15 小时前
Redis双写一致性
数据库·redis·缓存
老虎062716 小时前
Redis入门,配置,常见面试题总结
数据库·redis·缓存
J&Lu17 小时前
[DDD大营销-Redis]
数据库·redis·缓存