Search code examples
javadatabase-connectionkey-valuetarantool

Tarantool Java Connector


Do you know a way to connect Java and the Tarantool key/value storage? On the Tarantool web-site I can see connectors for C, Ruby, PHP, etc., but no connector for Java.

I know that Tarantool supports the Memcached protocol (with a lot of Java clients for it), but I need a native Tarantool protocol connector for Java.


Solution

  • The other answer is slightly outdated, so I feel that this topic needs an update about the current situation.

    There are two Java drivers present for Tarantool as of 2021:

    • An "old" tarantool-java, marked as deprecated, since it does not support vShard cluster, Cartridge, Tarantool 2.x+ features like new UUID and decimal types, has some problems with API and architecture and is out of maintenance for a long time. However, as of now, it's the one that supports JDBC interface, so you may choose it for connecting to a single Tarantool node via JDBC.
    • A "new" cartridge-java, which is currently actively developed and maintained, and provides a foundation for other necessary connector modules like cartridge-springdata and cartridge-spark. This driver uses Netty for the transport layer, the official MsgPack library for serialization, and provides support for single Tarantool nodes, vShard cluster, Cartridge and new Tarantool 2.x+ features. This driver is compatible with 1.10 Tarantol series too.

    So, for all cases except JDBC for a single Tarantool node (currently), I'd recommend using cartridge-java.