Java Memcached客户端 [英] Java Memcached Client

查看:335
本文介绍了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:

当你要求数据时,发出一套等等...这里有一个微小的并发队列插入,你得到一个阻止结果的未来(对于像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.

我在微基准测试方面做得还不错,但要与其他客户端进行公平比较,你必须设计不切实际的使用模式(例如,等待响应o n每个设置操作或构建锁定都会阻止它们进行数据包优化。)

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天全站免登陆