← ClaudeAtlas

simbalisted

Guide for using the Simba distributed mutex and leader-election library in JVM projects. Use when creating distributed locks, implementing leader-only work, configuring Simba backends (JDBC/MySQL, Redis, Zookeeper), writing MutexContender or AbstractScheduler subclasses, using SimbaLocker, integrating Simba with Spring Boot, choosing backends, or tuning TTL/transition settings. For test-focused work, use the simba-testing skill as well.
Ahoo-Wang/skills · ★ 3 · AI & Automation · score 76
Install: claude install-skill Ahoo-Wang/skills
# Simba — Distributed Mutex Library Simba provides distributed mutex (leader election) for JVM applications with three pluggable backends: JDBC/MySQL, Redis (Spring Data Redis), and Zookeeper (Apache Curator). ## How to Use This Skill Start by identifying four things: 1. Which backend the project already runs: Redis, JDBC/MySQL, or Zookeeper. 2. Which usage pattern fits the job: `MutexContender`, `SimbaLocker`, or `AbstractScheduler`. 3. Who owns lifecycle: explicit `start()`/`stop()`, Kotlin `.use {}`, Java try-with-resources, or Spring `SmartLifecycle`. 4. Whether the task is usage/configuration work or test work. For test-heavy tasks, also use `simba-testing`. Read `references/backend-internals.md` only when debugging backend behavior, explaining Lua/SQL/Curator internals, or tuning failure and handoff semantics. ## Backend Selection Help the developer pick the right backend based on their infrastructure: | Backend | Module | Best when | |---------|--------|-----------| | **Redis** | `simba-spring-redis` | Already using Redis. Best performance — Lua scripts + Pub/Sub for near-real-time notification. Recommended default. | | **JDBC/MySQL** | `simba-jdbc` | No Redis available. Uses polling with optimistic locking. Requires MySQL init script. | | **Zookeeper** | `simba-zookeeper` | Already using Zookeeper/Curator. Delegates to Curator's `LeaderLatch`. Simplest backend. | Decision heuristic: If the project has Redis, use Redis. If it has Zookeeper/Curator, use Zookeepe