enterprise-infrastructure

Design portable database, task queue, and exactly-once workflow infrastructure in Kailash.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/aliciapls/ML-Week-2---Healthcare --skill enterprise-infrastructure-aliciapls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enterprise-infrastructure
Source: https://github.com/aliciapls/ML-Week-2---Healthcare/tree/main/.claude/skills/15-enterprise-infrastructure
Command: npx skills add https://github.com/aliciapls/ML-Week-2---Healthcare --skill enterprise-infrastructure-aliciapls

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the complexity of building reliable, portable backend infrastructure by standardizing how Kailash handles databases, queues, worker coordination, and exactly-once execution across environments.

Core Features & Use Cases

  • Progressive infrastructure scaling: Move from single-process SQLite to shared PostgreSQL or MySQL deployments, then extend to multi-worker processing with a task queue.
  • Dialect-portable SQL: Write one canonical SQL style that translates safely across PostgreSQL, MySQL, and SQLite while preserving upsert, locking, and JSON behavior.
  • Operational reliability: Use shared connection management, worker heartbeats, dead-worker reaping, idempotent execution, and transactional queue claims to avoid race conditions and duplicate work.
  • Use Case: A backend engineer can launch a local prototype, switch to a shared production database, and enable distributed task processing without rewriting workflow code.

Quick Start

Ask the skill to help you design or troubleshoot Kailash enterprise infrastructure for database portability, task queues, worker registry behavior, and idempotent workflow execution.

Frequently Asked Questions about enterprise-infrastructure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scale from SQLite to PostgreSQL without rewriting my application code?

You can scale from SQLite to PostgreSQL or MySQL without code changes by using dialect-portable SQL with canonical question-mark placeholders, identifier validation, and lazy driver loading. Environment-driven configuration automatically adjusts database behavior from single-process to shared deployments.

What is exactly-once workflow execution and how does a task queue prevent duplicate work?

Exactly-once workflow execution ensures tasks are processed only once by combining transactional queue claims that atomically lock tasks with idempotent operations that safely handle retries. This prevents duplicate work even when multiple workers compete for the same job.

How does worker heartbeat management handle dead workers in a distributed task queue?

Worker registry heartbeat management tracks active workers and reaps dead workers by detecting missed heartbeats. When a worker fails, its claimed tasks are released back to the queue for reprocessing by available workers, ensuring stalled jobs are recovered.

Can I write portable SQL that supports upsert and locking across MySQL, PostgreSQL, and SQLite?

Yes, dialect-portable SQL supports upsert, locking, and JSON behavior across PostgreSQL, MySQL, and SQLite. Canonical SQL style with question-mark placeholders and identifier validation preserves these database-specific operations safely during translation between environments.

What's the best way to manage shared database connections across multiple workers?

Shared connection management centralizes database connections and coordinates access across multiple workers using lazy driver loading and a store factory. Environment-driven configuration scales from level 0 single-process behavior to level 2 multi-worker processing without changing workflow code.

Do I need to change my workflow code when enabling multi-worker task queue processing?

No, progressive infrastructure scaling lets you move from single-process SQLite to shared PostgreSQL or MySQL and enable multi-worker queue processing without rewriting workflow code. Environment-driven configuration handles the transition from level 0 to level 2 behavior automatically.