Build elastic data access
Lettuce is a scalable Redis client for building non-blocking Reactive applications
Lettuce is a scalable Redis client for building non-blocking Reactive applications
Lettuce provides asynchronous API with RedisFuture (CompletionStage) and Reactive types Flux [N] and Mono [0|1].
Low-latency communication, backpressure-enabled network engine for NIO TCP, epoll TCP and Unix Domain Sockets. Reactive Streaming is fully supported.
Lettuce comes with an API that gets you started quickly. Its simple yet powerful programming model allows you for trivial use-cases as well as for chained asynchronous flows.
RedisClient redisClient = RedisClient.create("redis://localhost/0");
StatefulRedisConnection<String, String> connection = redisClient.connect();
System.out.println("Connected to Redis");
connection.sync().set("key", "Hello World");
connection.close();
redisClient.shutdown();
Redis Standalone, Master/Slave, Redis Sentinel and Redis Cluster. Lettuce connects with all operational models natively supported by Redis. Partition-tolerance, Read Slaves and Transport-Level-Security provide the required foundation for highly scalable applications.
Redis Modules drive evolution and demand a client that is able to react to change. Lettuce's dynamic Redis Commands Interfaces leverage the dynamic module API with custom API interfaces.
interface MyCommandInterface extends Commands {
String get(String key);
@Command("GET")
byte[] getAsByteArray(String key);
@Command("NR.RUN net")
double neuralRun(int from, int to);
}
Battle-tested with major Cloud-based Redis services. Lettuce adopts the specifics of various cloud offerings to seamlessly integrate for best performance.