How contribsys/faktory works
Project type and purpose
• This is a full‐stack work queue server (“Faktory”) written in Go.
• Purpose: receive JSON jobs via clients/CLI, enqueue them, dispatch to workers, persist state in Redis, and provide a Web UI for monitoring.
File structure
• Top-level entry points:
• cmd/faktory → the daemon/server
• cmd/faktory-cli → the CLI
• Core components:
• client/ → Go client library to push/fetch jobs
• server/ → the server API, connection handling, job lifecycle
• storage/ → Redis‐backed queue/history operations
• manager/ → scheduling, retry, middleware, fetch logic
• webui/ → HTML templates, static assets, HTTP handlers
• util/ → cross-platform utilities (process, file, JSON, logging)
• internal/pool → internal client/connection pooling
• Packaging, Docker, Makefile, CI workflows show how it’s built, tested, and deployed.
README for additional insights
• Describes the high-level flow: clients submit jobs → server enqueues → workers fetch → retries on failure → Web UI for management.
• Mentions external dependencies: Redis for storage, any language may use the API.
Elements
• Labels: “Client Library”, “CLI”, “Faktory Server API”, “Manager”, “Storage (Redis)”, “Web UI”
• Push jobs → Server → Storage
• Fetch jobs ← Server ← Storage
• Web UI ↔ Server
• Green for core server modules
• Yellow for external dependencies (Redis)
• Gray for Web UI