workerd is Cloudflare's JavaScript/Wasm server runtime powering the Cloudflare Workers platform. It implements a nanoservices architecture where all services are deployed to every machine, using a capability-based security model for isolation. The runtime executes serverless Workers in response to HTTP requests, queues, scheduled events, and other triggers, providing APIs for HTTP, storage (KV, Durable Objects, R2), websockets, and more. The core is implemented in Rust and C++ with bindings for JavaScript/TypeScript and Python via Pyodide. Key entry points include the `workerd` CLI binary (built via Bazel) and the Rust `workerd_cli::main()` function. The system processes requests by routing them to Worker isolates, which execute user scripts and can access bindings for subrequests, storage, and other services. It includes extensive compatibility layers for Node.js APIs and Web standards, along with a comprehensive test suite validating spec compliance and implementation correctness.
Inngest JS is a TypeScript SDK for building reliable, event-driven applications with durable execution. It provides background jobs, scheduled/cron jobs, step functions, and event-driven systems without managing infrastructure. The SDK works across multiple runtimes (Node.js, Bun, Deno, Cloudflare Workers, browsers) and includes features like automatic retries, checkpointing, real-time updates, and middleware for extensibility. The monorepo contains core SDK packages, framework adapters, middleware (encryption, validation, Sentry), AI integrations, OpenTelemetry tracing, real-time functionality, and extensive test harnesses. Examples demonstrate integration with popular frameworks like Next.js, Express, SvelteKit, Remix, and NestJS.
Queuelib is a Python library providing persistent and in-memory queue data structures. It implements FIFO, LIFO, priority, and round-robin queues with disk-based storage options for durability. The library is dependency-free, using only the Python standard library, and is designed for scenarios requiring reliable queuing such as web crawlers. Architecture consists of modular components: base queue classes in queue.py, priority queue in pqueue.py, and round-robin queue in rrqueue.py. Disk-based queues manage data through chunk files (FIFO) or single files (LIFO) with careful bookkeeping to survive process restarts. The priority and round-robin queues use a factory pattern to decouple queue logic from storage implementation, enabling flexibility.