Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mooner1022/re.this

Repository files navigation

Re.This Logo

Maven Central KDocs
codecov

What is Re.This?

Re.This is a Kotlin Multiplatform Redis client built for coroutine‐based, non‐blocking, high‐performance applications.

  • Raw sockets & connection pooling for rock‐solid throughput
  • ✅ Full support for RESPv2/RESPv3, RedisJSON, Streams, Pub/Sub, and more
  • ✅ Tiny footprint over all targets: JVM, Android, iOS, WASM, Node.js, and other native targets
  • ✅ Сompatible with Valkey/KeyDB — since it shares the same API as Redis.

Designed for modern Kotlin developers seeking a fast, lightweight, and idiomatic Redis integration.

Key Features

  • Complete Command Coverage Strings, Hashes, Lists, Sets, Sorted Sets, Streams, Bitmaps, Geospatial, Transactions, Scripting, Functions, ...
  • Advanced Patterns
    • Pipelining & Transactions DSL
    • Publish/Subscribe with lifecycle management
    • Script & JSON support
  • Multiplatform Targets JVM, Android, iOS, Linux, Windows, macOS, tvOS, watchOS, Node.js, WASM
  • High Performance Optimized for throughput and minimal latency via raw socket I/O

Installation

Add to your build.gradle.kts:

dependencies {
 implementation("eu.vendeli:rethis:0.3.9")
}

Quick Start

suspend fun main() {
 // 1. Initialize client (defaults to localhost:6379)
 val client = ReThis()
 // 2. Simple SET/GET
 client.set("hello", "world")
 println(client.get("hello")) // → "world"
 // 3. Pipeline multiple commands
 val results = client.pipeline {
 set("foo", "bar")
 get("foo")
 }
 println(results) // → [OK, "bar"]
 
 // 4. Transaction
 val txResults = client.transaction {
 set("bar", "baz")
 get("bar")
 }
 println(txResults) // → [OK, "baz"]
 // 5. Pub/Sub example
 client.subscribe("news") { _, msg -> println("Received: $msg") }
}

Benchmarks & Performance

Library Ops/sec
Rethis 1,452,718
Lettuce 1,380,333
Kreds 839,861
Jedis (pooled) 15,727

Compatibility & Requirements

  • Java: 17+
  • Redis/Valkey/KeyDB: any modern version (RESPv2/v3)

Resources & Documentation

Acknowledgements

Thanks to all contributors and users—your feedback drives our improvements!

⭐ If you find Re.This helpful, please give it a star on GitHub!

About

Kotlin Multiplatform Redis Client: coroutine-based, DSL-powered, and easy to use.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

Contributors

Languages

  • Kotlin 99.8%
  • Shell 0.2%

AltStyle によって変換されたページ (->オリジナル) /