Skip to content

Releases: tarantool/tarantool-java-sdk

1.6.0

02 Apr 08:59

Choose a tag to compare

What's Changed

BOM Module

Add tarantool-java-sdk-bom module providing centralized dependency management for all Tarantool Java SDK modules and their dependencies.

Client

TupleMapper

Add static utility class TupleMapper for easy tuple-to-POJO mapping using field format:

// Map tuple to POJO using format metadata
Person mappedPerson = TupleMapper.mapToPojo(tuple, Person.class);

CRUD operations (select, insert, get) now propagate format metadata from CrudResponse, enabling easy mapping.

Request/Response Handlers

Add Handlers class with 4 lifecycle callbacks for request/response tracing. Configured via withHandlers() builder method:

TarantoolBoxClient client = TarantoolFactory.box()
    .withHost(tt.getHost())
    .withPort(tt.getFirstMappedPort())
    .withHandlers(
        Handlers.builder()
            .onBeforeSend(request -> {
              // Called before sending request
            })
            .onSuccess(response -> {
              // Called on successful response
            })
            .onTimeout(request -> {
              // Called when request times out
            })
            .onIgnoredResponse(response -> {
              // Called when response arrives after timeout
            })
            .build())
    .build();

Testcontainers

  • Remove dependency on testcontainers-java-tarantool library
  • Update all integration tests to use new container implementation

Spring-data

Add tarantool-spring-data-35 module with support for Spring Boot 3.5.x and Spring Data 3.5.

Bug fixes

Fix a memory leak due to the use of a local thread pool.

Dependencies

  • Bump spring-boot version from 3.4.11 to 3.4.13 in tarantool-spring-data-34

Full Changelog: 1.5.0...1.6.0

1.5.0

26 Dec 08:25

Choose a tag to compare

Initial open source release Changelog

This library created to interact with Tarantool 2.11+, 3.x and all products on it's base like Tarantool DB, Tarantool Data Grid

Core Protocol Support

  • IPROTO Protocol: Full support for IPROTO protocol features including:
  • Tarantool Types, complete support for all tarantool types including:
  • Async Operations: Async request model using completable futures

Client APIs

  • IProto Client: Low-level API for tarantool protocol that follows the protocol as it is (call, eval, select, insert, ...)
  • Connection Management: Support for multiple Tarantool nodes, connection pools, and graceful shutdown
  • Box Client: High-level API for tarantool protocol that simplifies working with the protocol. Should use to work directly with Tarantool storage
  • Crud Client: High-level API for tarantool/crud operations with simplified interfaces to work with Tarantool cluster that supports tarantool/crud library
  • (experimental) TDG Client: client implementation for Tarantool Data Grid 1.x/2.x

Spring Data Integration

  • Multiple Spring Versions: Support for Spring Data 2.7.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x with dedicated modules
  • Repository Support: Full repository functionality including findById, save, delete, existsById, count operations
  • Derived Queries: Support for derived query methods with keywords like findBy*, deleteBy*, existsBy*, countBy*
  • Composite Keys: Support for composite keys using @IdClass annotation
  • Custom Annotations: @Query annotation for proxying call/eval operations
  • Pagination: Supports Spring Data Pageable interfaces: Page, Pageable, Slice, Scroll API

Advanced Features

  • Schema Management: Online schema reload and support for space/index
  • Heartbeat & Health Checks: Support for heartbeats using IPROTO_PING requests with customizable ping functions to detect whether connected instance alive or not
  • Monitoring: Built-in metrics support with customizable metrics registry (Prometheus exporter)

Data Mapping & Serialization

  • Flexible Java Types Mapping: Java types be easily mapped to Tarantool via Jackson for msgpack. Implicitly by High-level clients or could use explicitly by low level clients.
  • POJO Mapping: Mapping between tarantool types and POJOs also by Jackson for msgpack
  • Object Operations: Object-based CRUD methods (insert_object, replace_object, upsert_object, etc.)
  • Nil Response Handling: NilErrorResponse class for handling nil responses in call/eval operations
  • Tuple Extensions: Support for MP_TUPLE extension type with format information

Load Balancing & Connection Management

  • Balancer Support: Round-robin balancers for distributing requests
  • Connection Pooling: Robust connection pooling with PoolEventListener support
  • Watchers: Enhanced watcher support with synchronization and error handling
  • Reconnection: Configurable reconnecting delay and connection timeout options

Testing & Development

  • Testcontainers: Dedicated testcontainers module
  • TDB2 Cluster Support: Simple realization of TDB2 cluster testcontainers
  • Configuration: Property-based, JavaConfig, and annotation-based configuration options

Security & Authentication

  • Authentication: Support CHAP-SHA1 and PAP-SHA256
  • Role-based Access: Support for super user roles in testcontainers configuration

Performance Optimizations

  • Encoding Efficiency: Optimized encoding with single messagepack packer per connection
  • Memory Management: Efficient serialization focusing only on user data
  • Thread Safety: Thread-safe implementations for concurrent operations

This comprehensive feature set makes the Tarantool Java SDK library a powerful tool for integrating Java applications with Tarantool databases, offering both low-level protocol access and high-level abstractions for common operations.

Contributors

Full Changelog: https://github.com/tarantool/tarantool-java-sdk/commits/1.5.0