AREDIS


AREDIS

Documentation

AREDIS

AREDIS (Asynchronous REDIS java client) is a java client for the Redis Cache server designed for performance and efficiency in terms of utilization of Connections and Threads.

It has only one connection to each server and uses pipelining for performance rather than connection pooling.

It uses the Java 7 NIO based Asynchronous channel API for socket communication to the Redis server.


Features

Pipelined

All commands are pipelined.

Data Handlers

Data Handlers specify serialization and de-serialization between Java Objects and bytes stored in redis.

In addition to the data handlers provided you can define and use your own Custom Data handler.

OPTI_JAVA_HANDLER

Opti Java Handler is an efficient Data Handler for Java Objects.

In normal Java Serialization the Class Descriptors used to specify the Class structure in the form of fields is repeated for each serialization.

Opti Java Handler avoids this repetition of information by maintaining a common set of class descriptors under a REDIS key and having indexes in the serialized data point to this list.

Built-in GZIP Compression

Java and Opti Java data handlers use gzip to compress data larger than 1 Kb.

Scripting Support

pseudo command EVALCHECK automatically checks and loads a Redis script for the first time before running it with the EVALSHA command.

Subscribe API for messaging

There is a Subscribe API for subscribing to messages sent using Redis's PUB/SUB mechanism.

Client side Sharding

For commands that use a single key or with MSET and MGET you can distribute keys across multiple servers based on a Consistent Hashing Algorithm.

Synchronous and Asynchronous usage

You can use the java Future based methods for synchronous usage or Callback based methods for asynchronous usage.

Connection Pool for Transactions

The default single connection is not suitable for the stateful transactions using redis WATCH command.

A connection pool is provided for this purpose.

The pool also has an asynchronous borrow API.

Closing of idle connections

Connections idle beyond a configurable time (Default 15 minutes) are closed.

An automatic re-connection is done when a closed connection receives a new command.


Acknowledgements

The Consistent Hashing Algorithm was implemented after referring to the implementation in SpyMemcached memcached client.


Contact

My email is msuresh@cheerful.com


License

AREDIS is free to download, use, modify and redistribute for non-commercial and commercial purposes without any warranties of course.


My Other Projects

Jdatestamp: A Lossless Date Stamper for Digital Pictures.

MediaUtil (LLJTran) A Java Library for Lossless JPEG Transformations and modifying Exif header.



Copyright © 2013-2014, Suresh Mahalingam