DEV.co
Open-Source Databases · jasync-sql

jasync-sql

jasync-sql is an async database driver for MySQL and PostgreSQL written in Kotlin, enabling non-blocking database queries using CompletableFuture and modern Java async patterns. It is built on Netty and serves as a maintained Kotlin port of the archived mauricio/postgresql-async library.

Source: GitHub — github.com/jasync-sql/jasync-sql
1.7k
GitHub stars
136
Forks
Kotlin
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryjasync-sql/jasync-sql
Ownerjasync-sql
Primary languageKotlin
LicenseApache-2.0 — OSI-approved
Stars1.7k
Forks136
Open issues18
Latest release2.2.4 (2023-09-04)
Last updated2026-01-15
Sourcehttps://github.com/jasync-sql/jasync-sql

What jasync-sql is

A Netty-based asynchronous JDBC-like driver providing non-blocking connection pooling and query execution for MySQL and PostgreSQL. Supports R2DBC (Reactive Relational Database Connectivity) since v0.9.51, R2DBC GA 1.0 from v2.1.0, and includes optional modules for PostGIS spatial types and async object pooling.

Quickstart

Get the jasync-sql source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/jasync-sql/jasync-sql.gitcd jasync-sql# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

High-throughput I/O-bound microservices

Non-blocking database access in Spring Data R2DBC, Vert.x, Micronaut, or Ktor applications where thread-per-request models are inefficient and reactive stacks are preferred.

Real-time analytics and data pipelines

Async query execution with connection pooling for systems requiring low-latency, high-concurrency database reads; particularly where Java 8+ datetime handling is acceptable.

Kotlin/JVM backends with reactive frameworks

Native Kotlin implementation integrating seamlessly with Kotlin coroutines, Spring WebFlux, and reactive stacks seeking to eliminate Scala dependencies.

Implementation considerations

  • Requires Java 8+ and Kotlin runtime; async model demands callback or reactive operator understanding to avoid pitfalls (e.g., connection lifecycle, error handling in futures).
  • Connection pool configuration and sizing differs from JDBC—review pool-async module and wiki to prevent resource exhaustion or connection starvation under load.
  • DateTime handling uses java.time (v2.x), not JodaTime (v1.x); migration path exists but verify downstream dependencies handle LocalDateTime consistently.
  • R2DBC upgrade to GA 1.0 in v2.1.0 requires Spring Boot 3+; v2.0.8 is last compatible with R2DBC <= 0.9.1; version mismatch will cause runtime failures.
  • Unix domain socket support (v2.1.6+) and PostGIS (v2.1.7+) are optional; only pull in if needed to avoid unused dependencies.

When to avoid it — and what to weigh

  • Standard blocking JDBC is acceptable — If your workload fits traditional thread pools and blocking I/O, HikariCP or standard JDBC drivers are simpler and widely battle-tested. Async overhead may not justify complexity.
  • Require strict JDBC compliance — jasync-sql is not fully JDBC-compatible. It uses its own async API (CompletableFuture) instead of blocking Statement/ResultSet semantics; code written for JDBC will not port directly.
  • Database support beyond MySQL/PostgreSQL — Only MySQL and PostgreSQL are supported. If you need Oracle, SQL Server, or other databases, use standard JDBC drivers or R2DBC providers for those platforms.
  • Need guaranteed LTS with SLA backing — Community-maintained project with no formal commercial support or SLA. While production-used at scale (per README graphs), adoption is moderate compared to mainstream drivers.

License & commercial use

Licensed under Apache License 2.0 (OSI-approved permissive open-source license). Full license text is available in the repository. No copyleft restrictions; modifications and commercial use are permitted with attribution and liability disclaimers.

Apache 2.0 permits commercial use without royalties or license fees. However, no formal commercial support, maintenance SLA, or indemnification is provided by the project maintainers. Organizations deploying at scale should evaluate internal support capacity or seek third-party backing if required.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Standard SQL injection prevention: use parameterized queries (sendPreparedStatement with placeholders). No explicit security audit data is published. Netty is a mature, widely-audited framework, reducing transport risk. TLS/SSL support is unknown; verify certificate handling and connection encryption options in documentation. Dependency supply-chain security is typical OSS risk; review transitive dependencies (Netty, Kotlin stdlib) for known CVEs in your deployment environment.

Alternatives to consider

R2DBC with io.r2dbc:r2dbc-pool + vendor drivers (H2, MariaDB, etc.)

R2DBC is a standardized reactive database API; multiple vendors provide drivers. Offers wider database support and potential for vendor switching without code changes.

Vert.x MySQL/PostgreSQL Client (vertx-mysql-postgresql-client)

Vert.x-native async driver, tightly integrated with Vert.x event bus and deployment model. Better fit if entire stack is Vert.x; less suitable for Spring/Micronaut stacks.

HikariCP + blocking JDBC with virtual threads (JDK 19+)

Java 21+ virtual threads can make blocking JDBC near-equivalent to async in throughput; simpler API, broader ecosystem, no async/reactive complexity. Trade-off is JVM memory overhead per virtual thread.

Software development agency

Build on jasync-sql with DEV.co software developers

Review the wiki, run a sample (jasync-mysql-example, jasync-postgresql-example), and benchmark against your workload. Consult the FAQ and Known Issues on GitHub before committing to production.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

jasync-sql FAQ

Is jasync-sql JDBC-compatible?
No. It provides an async API using CompletableFuture instead of blocking JDBC interfaces (Statement, ResultSet). Existing JDBC code will not port directly; use if starting from scratch or refactoring to async/reactive.
What is the relationship to mauricio/postgresql-async?
jasync-sql is a maintained Kotlin port of the archived mauricio library (originally Scala). It is functionally compatible but not a drop-in replacement; jasync removes the Scala dependency and adds MySQL support and modern features (R2DBC, PostGIS).
Can I use jasync-sql in a blocking Spring MVC application?
Possible but not recommended. jasync is optimized for reactive/async stacks (Spring WebFlux, R2DBC). Using CompletableFuture with blocking thread pools defeats the async benefit. Prefer traditional JDBC or Spring Data JPA for blocking workloads.
Which version is compatible with Spring Boot 3?
jasync-sql v2.1.0 and later support R2DBC GA 1.0, required for Spring Boot 3+. v2.0.8 is the last version supporting R2DBC <= 0.9.1 (Spring Boot 2.x).

Custom software development services

From first prototype to production, DEV.co delivers software development services around tools like jasync-sql. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source databases and beyond.

Ready to evaluate jasync-sql for your stack?

Review the wiki, run a sample (jasync-mysql-example, jasync-postgresql-example), and benchmark against your workload. Consult the FAQ and Known Issues on GitHub before committing to production.