Redis客户端Lettuce

在日常的一些应用场景中,提到redis总能想到jedis。今天degbug无意间发现Lettuce的存在,Lettcue官网。Lettuce 是一个基于netty和 Reactor的可扩展线程安全 Redis 客户端。Lettuce 提供了同步、异步和反应式API 来与 Redis 交互。

Lettuce由来

关于Lettuce的出现背景,我再维基百科找到了以下内容

Lettuce was originally written by Will Glozer as scalable and thread-safe Java Redis client. It was the most advanced client providing the greatest Redis command coverage, but the maintenance stopped somewhere mid-2013.
It started with a project on which I worked on. I had to integrate Redis for collecting logs during integration tests. I tried several, available clients. Every one of them had issues with unstable connections, library issues (external libraries that get in conflict with the existing project dependencies) or was just not up to date. I was experiencing connections drops in my environment; sometimes there is a lot of traffic, and sometimes the connection is idle for hours.
Based on my research, Lettuce was the best choice amongst all. Lettuce provides async handling out of the box; it can reconnect inactive connections. The only problem: It’s not up to date, and the last release was one year ago. I’ve added the latest features including Sentinel and cluster support and opened a pull request, but there was no real interest in merging the changes back into Lettuce. After some controversy on this, I’ve decided to publish my fork of Lettuce. My vision for Lettuce is becoming the best Redis client available.

谷歌的翻译

Lettuce最初由 Will Glozer 编写,作为可扩展和线程安全的 Java Redis 客户端。它是最先进的客户端,提供了最大的 Redis 命令覆盖范围,但维护在 2013 年年中的某个地方停止了。
它始于我参与的一个项目。我必须集成 Redis 以在集成测试期间收集日志。我尝试了几个可用的客户端。他们每个人都有不稳定连接、库问题(与现有项目依赖项冲突的外部库)或只是不是最新的问题。我在我的环境中遇到连接下降;有时流量很大,有时连接空闲数小时。
根据我的研究,生菜是最好的选择。Lettuce 提供了开箱即用的异步处理;它可以重新连接不活动的连接。唯一的问题:它不是最新的,最后一次发布是一年前。我已经添加了包括 Sentinel 和集群支持在内的最新功能,并打开了一个拉取请求,但对将更改合并回 Lettuce 并没有真正的兴趣。在对此进行了一些争议之后,我决定发布我的生菜叉。我对 Lettuce 的愿景是成为最好的 Redis 客户端。

Lettuce特性

  • Lettuce是个完全非阻塞的 Redis客户端,使用 netty构建,提供响应式异步和同步数据访问。
  • Lettuce提供异步AP与RedisFuture(CompletionStage和 Reactive类型Fux[N]和Mono。
  • 用于 NIO TCP、 epoll TCP和Unix域套接字的低延迟通信、支持背压的网络引擎。完全支持反应式流媒。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

你我无缘,全靠BUG

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值