We tested lettuce using YourKit for performance. Subtracting all IO the most time is spent on constructing the return futures and command objects. The async API can issue about 300Kops/sec whereas the sync API performs about 13Kops/sec (GET's, PING's) on a single thread. Sync performance depends on the Redis performance (tested on a Mac, 2,7 GHz Intel Core i7).

lettuce provides now also base functionality for building clients using the Redis protocol. An example is spinach (https://github.com/mp911de/spinach).

lettuce is built with Java 8 but can be used with Java 6, 7 and 8. Java 6 and 7 support will be dropped with lettuce 4.0. The new lettuce-testcontainer project ensures until then. You can find the build results at https://travis-ci.org/mp911de/lettuce-testcontainer

If you need any support, meet lettuce at https://gitter.im/mp911de/lettuce

From now on, mp911de/lettuce is a standalone repo that is no longer a Github fork of wg/lettuce. On code and IP-level, it is of course it is the fork of wg/lettuce. This Github fork flag prevented searching for code and searches for lettuce did not show up the repo itself. The change is only, how Github handles the repo, everything else stays the same.

Unix Domain Sockets

Unix Domain Sockets are useful only if connecting locally and maintaining the connection point on your own. Using RedisClusterClient with Unix Domain Sockets would connect to the local node using a socket and then open TCP connection to all the other hosts. A good example is connecting locally to a standalone or a single cluster node to gain performance.

Unix Domain Socket connections are currently only available to Linux x86_64 systems with a minimum netty version of 4.0.26.Final. You can, however, port the native library to your system. The netty guys would appreciate.

See https://github.com/mp911de/lettuce/wiki/Unix-Domain-Sockets

Enhancements

  • Provide an option to connect to Redis via Unix Domain Sockets #52
  • Add new cluster command MYID #53 (Thanks to @taer)
  • Expose futures of re-subscription on reconnect #62 (Thanks to @kichik)
  • Ping before connect #61 (Thanks to @kichik)
  • Introduce ClientOptions to control specific behavior #58
  • Enhance stability when reconnecting #56
  • Extract and use interfaces for improved extensibility

Fixes

  • RedisPubSubConnectionImpl.activated does not call super.activated() #55
  • RedisPubSubConnectionImpl.activated() deadlock #57

Other

  • Inspect lettuce using YourKit #54

lettuce requires a minimum of Java 8 to build and Java 6 run. It is tested continuously against Redis 3.0.

Links

Maven coordinates:

<dependency>
    <groupId>biz.paluch.redis</groupId>
    <artifactId>lettuce</artifactId>
    <version>3.2.Beta1</version>
</dependency>

<dependency>
    <groupId>biz.paluch.redis</groupId>
    <artifactId>lettuce</artifactId>
    <version>3.2.Beta1</version>
    <classifier>shaded</classifier>
</dependency>

Any feedback is appreciated or create issues on GitHub.