Java Memcached Client

What is the best Java memcached client and why?

+51
java web-applications memcached
Apr 08 '09 at 20:42
source share
7 answers

As the author of spymemcached , I am a little biased, but I would say this for the following reasons:

Designed from the ground up to be non-blocking everywhere.

When you request data, issue a set, etc .... there is one tiny parallel insertion of the queue, and you get the future to block the results (with some convenient methods for common cases like get).

Optimized aggressively

You can read more on my optimizations page, but I am doing the optimization of the entire application.

I am still well versed in micro-tests, but to compare with another client you need to settle unrealistic usage patterns (for example, waiting for a response to each given operation or blocking the building around allows them to be avoided by optimizing the packages).

Verified obsessively

I maintain a fairly strict test suite with coverage reports in each release.

Errors are still slipping, but they are usually pretty minor, and the client continues to improve. :)

Well documented

The examples page provides a brief introduction, but javadoc goes into great detail.

Provides high-level abstractions

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

Retains performance

I do a lot of work on the server itself, so I do not lag behind protocol changes.

I made the first implementations of the binary protocol server (both the test server and memcached itself), and this was the first production-ready client to support it and makes it first-class.

I also have support for several hash algorithms and node allocation algorithms, all of which are well tested for each assembly. You can make a hash code with a ketam margin, or a derivative using FNV-1 (or even your own java string hashing) if you want to improve performance.

+53
Apr 09 '09 at 16:31
source share

I believe the imap client with memcached is the best client.

Functions

  • Support for binary protocols . The fastest way to access the key / value stored on the memcached server.
  • UDP protocol support . You can install the key with tcp protocol and get the udp protocol. In fact, some large corporations do this.
  • Support for custom serialization and deserialization.
  • Connection pool with NIO and direct buffer. Dynamically increase connections when they are not used for a connection pool.

Performance

  • Refer to performance for a test test of existing popular memcached Java clients.
  • Deserialization upon receipt of a response
  • Performance tuning in each line of source code.
+5
Apr 30 '10 at 2:47 april
source share
+5
Jul 08 2018-10-10T00:
source share

About a year ago, when I had to use the memcached java client, the spymemcached connector was described as an optimized API with many functions. Several new releases of the memcached client have appeared since then, so it might be worth checking out.

FWIW spy client worked fine for me.

+4
Apr 09 '09 at 14:57
source share

I use SpyMemcached and I have to agree that it is the best available there, with many new improvements.

+2
Aug 19 '09 at 1:24
source share

There is a memcached client for Java and spymemcached . Not much experience with this.

+1
Apr 08 '09 at 21:39
source share

Try xmemcached , it is also based on nio and has some powerful features.

0
Oct 14 '09 at 6:50
source share



All Articles