yugabytedb-app-devlisted
Install: claude install-skill srinivasa-vasu/agent-skills
# YugabyteDB Application Development Skill
A reference skill for building applications on top of YugabyteDB, covering connection config,
transaction retries, and language/framework-specific best practices.
---
## Overview
YugabyteDB is a distributed SQL database compatible with PostgreSQL. Writing applications for it
requires attention to three areas standard Postgres apps often skip:
1. **Driver** — Use the YugabyteDB JDBC driver (`jdbc-yugabytedb`) or the standard Postgres driver.
YB's driver adds cluster-aware load balancing and topology routing.
2. **Retries** — Distributed transactions can fail with transient errors (serialization failures `40001`,
deadlocks `40P01`, connection resets). Applications MUST retry these rather than surface them to users.
---
## Quick Reference by Runtime
| Runtime | Driver / Library | Retry Mechanism |
|---|---|---|
| Java / Spring Boot | `jdbc-yugabytedb` + HikariCP | Spring core `RetryPolicy` + `ExponentialBackOff` (built-in, no extra dep) + AOP aspect |
| Java / Spring Boot Reactive | `r2dbc-postgresql` + r2dbc-pool | Reactor `.retryWhen(YbRetry.spec())` inline in pipeline |
| Java / Quarkus | `jdbc-yugabytedb` + Agroal | SmallRye `@Retry` + CDI interceptor for exception translation |
| Python | `psycopg2` / `asyncpg` | Custom decorator wrapping `psycopg2.errors.SerializationFailure` | Two connection pools |
| Node.js | `@yugabytedb/pg` (smart driver) | `withRetry` loop catching `40001`/`40P01`/`XX000` | `EndpointPoolManager`