Java Memcached 客户端 [英] Java Memcached Client

查看:36
本文介绍了Java Memcached 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个是最好的 Java memcached 客户端,为什么?

Which is the best Java memcached client, and why?

推荐答案

作为spymemcached,我有点偏见,但我会说它是我的,原因如下:

As the author of spymemcached, I'm a bit biased, but I'd say it's mine for the following reasons:

当您请求数据、发布集合等时……有一个微小的并发队列插入,您会得到一个 Future 来阻止结果(使用一些方便的方法来处理诸如 get 之类的常见情况).

When you ask for data, issue a set, etc... there's one tiny concurrent queue insertion and you get a Future to block on results (with some convenience methods for common cases like get).

您可以在我的优化 页面上阅读更多内容,但我完全-应用优化.

You can read more on my optimizations page, but I do whole-application optimization.

我在微基准测试中仍然做得很好,但要与其他客户端进行公平比较,您必须设计不切实际的使用模式(例如,等待每个设置操作的响应或围绕获取构建锁以防止它们做数据包优化).

I still do pretty well in micro-benchmarks, but to compare fairly against the other client, you have to contrive unrealistic usage patterns (for example, waiting for the response on every set operation or building locks around gets to keep them from doing packet optimization).

我维护了一个非常严格的测试套件,每个版本都有覆盖率报告.

I maintain a pretty rigorous test suite with coverage reports on every release.

错误仍然存​​在,但它们通常很小,并且客户端会不断改进.:)

Bugs still slip in, but they're usually pretty minor, and the client just keeps getting better. :)

示例 页面提供了快速介绍,但 javadoc 非常详细.

The examples page provides a quick introduction, but the javadoc goes into tremendous detail.

我有一个缓存的 Map 接口以及一个功能性的 CAS 抽象.二进制和文本都支持 incr-with-default 机制(由二进制协议提供,但在文本中相当棘手).

I've got a Map interface to the cache as well as a functional CAS abstraction. Both binary and text support an incr-with-default mechanism (provided by the binary protocol, but rather tricky in text).

我在服务器本身上做了大量工作,所以我跟上协议的变化.

I do a lot of work on the server itself, so I keep up with protocol changes.

我完成了第一个二进制协议服务器实现(包括测试服务器和 memcached 本身),这是第一个支持它的生产就绪客户端,并且是一流的.

I did the first binary protocol server implementations (both a test server and in memcached itself), and this was the first production-ready client to support it, and does so first-class.

我还支持多种哈希算法和节点分布算法,所有这些算法都经过了针对每个构建的良好测试.如果您想要更好的性能,您可以使用 FNV-1(甚至 Java 的本机字符串哈希)进行股票 ketama 一致性哈希或派生.

I've also got support for several hash algorithms and node distribution algorithms, all of which are well-tested for every build. You can do a stock ketama consistent hash, or a derivative using FNV-1 (or even java's native string hashing) if you want better performance.

这篇关于Java Memcached 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆