Sidequest.js is a Redis-free background job processing system for Node.js/TypeScript that provides distributed, durable job processing using existing databases (PostgreSQL, MySQL, SQLite, MongoDB). The system features a modular monorepo architecture with separate packages for core logic, engine, database backends, web dashboard, and CLI tools. It implements job lifecycle management, scheduling via cron expressions, uniqueness constraints, retry mechanisms with backoff strategies, and provides a web interface for monitoring and management. The architecture follows clean separation of concerns with dependency injection, worker thread isolation via Piscina, and process isolation through forked child processes. Key entry points include the main Sidequest facade, engine configuration, dashboard interface, and CLI administration tools.
This repository provides TransmittableThreadLocal (TTL), a Java library that extends InheritableThreadLocal to propagate thread-local values across threads even when using thread pools, executors, ForkJoinPool, and other asynchronous constructs. It solves the common problem of context loss (e.g., tracing, security, session) in asynchronous Java applications. The library offers three usage modes: manual wrapping of Runnable/Callable via TtlRunnable/TtlCallable, wrapping executors via TtlExecutors, and transparent bytecode transformation via a Java Agent (TtlAgent) that automatically instruments JDK thread pool classes. The architecture is modular: ttl-core contains the core API and CRR (Capture-Replay-Restore) pattern, ttl-agent provides the agent with Javassist-based transformlets, ttl-kotlin adds Kotlin extensions, and ttl-integrations includes Vert.x 3/4 support. A ttl2-compatible module maintains backward compatibility with the v2 API. The library is widely adopted in the Java ecosystem (e.g., Apache ShardingSphere, SOFARPC) and is under active development with a v3 branch introducing a refined API. While primarily a library, it includes a Java Agent component that operates at the JVM level, making it a hybrid of library and instrumentation tool.
Ratpack is a lightweight, reactive web framework for the JVM built on Netty and Java 8. It provides an asynchronous execution model based on Promise/Operation, a flexible handler chain for request processing, pluggable configuration from multiple sources, and a Registry-based dependency injection system. The framework includes first-class Groovy DSL support, a comprehensive test harness, and integrations with Spring Boot, Google Guice, Dropwizard Metrics, multiple template engines (Handlebars, Thymeleaf, Rocker, Groovy), Redis for session storage, and reactive libraries (RxJava 2, Reactor). The codebase is modular with over 30 subprojects, extensive Spock test coverage, and a Gradle plugin for continuous reloading. While the public API is well-designed and documented, the internal packages are tightly coupled to Netty internals and some integration modules may lag behind external library versions.
go-actor is a Go library implementing the Actor model for concurrent programming. It provides core abstractions: Actor (with Start/Stop), Worker (defining work via DoWork), and Mailbox for message passing. The library enables building concurrent systems without mutexes by leveraging goroutines and channels. Key features include non-blocking message sends (by default), combinable actors for collective lifecycle management, and pluggable mailbox modes (internal queue or Go channel wrapper). The design emphasizes zero-overhead composition, graceful shutdown, and compatibility with Go's scheduler. The codebase is well-tested, actively maintained, and follows modern Go practices with rigorous CI/linting.
Smol is a lightweight async runtime for Rust that bundles several well-known subcrates (async-executor, async-io, async-net, async-fs, async-process, async-channel, async-lock, blocking, futures-lite) into a single convenient dependency. It provides a global executor initialized lazily with configurable thread count via the SMOL_THREADS environment variable, and exposes a simple API (smol::spawn, smol::block_on, smol::Async, smol::Timer, smol::Unblock, etc.) for writing async programs. The source code itself is thin—primarily re-exports from subcrates plus a spawn module that sets up the global executor. This makes smol an excellent entry point for Rust async development without the complexity of larger runtimes like tokio. The repository includes a rich set of examples covering TCP, TLS, HTTP, WebSocket, file I/O, process management, and platform-specific features like inotify and timerfd. The codebase is well-maintained, uses modern Rust practices (edition 2021, MSRV 1.85, no unsafe), and has active CI and dependabot configuration.
Coz is a causal profiler for native code (C/C++, Rust, Go, Swift, Java) that uses virtual speedup experiments to identify which lines of code, if optimized, would most improve program throughput or latency. It operates by injecting a shared library (libcoz) via LD_PRELOAD or DYLD_INSERT_LIBRARIES, interposing synchronization primitives to track blocking and apply controlled delays on non-selected threads. The profiler outputs a JSON Lines profile that can be visualized with a built-in web viewer (D3.js scatter plots with loess smoothing) or analyzed via CLI. It includes an AI-assisted feature for suggesting progress point placement and optimization advice. The architecture is a hybrid: a core runtime library in C++ with language bindings for Rust, Go, Swift, and Java (JVMTI agent), plus a Python CLI that orchestrates profiling, visualization, and LLM integration. The project is a research artifact from UMass Amherst, published at SOSP 2015, and remains actively developed with modern features like streaming AI support.
lockfree is a header-only C++11 library providing lock-free data structures for concurrent programming. It offers both single-producer single-consumer (SPSC) and multi-producer multi-consumer (MPMC) variants of queues, ring buffers, bipartite buffers, and priority queues. The library is designed for use across a wide spectrum of systems from deeply embedded to HPC, featuring no dynamic allocation and optimized for high performance. Architecture-wise, it's organized into spsc/ and mpmc/ namespaces with each data structure having separate header and implementation files, aggregated through lockfree.hpp. The implementation uses atomic operations and clever algorithms to achieve lock-free behavior without mutexes.
OhMyThreads.jl is a Julia package providing user-friendly tools for task-based multithreaded calculations. It offers both a higher-order functions API (tmapreduce, treduce, tmap, etc.) and a macro API (@tasks for ... end) similar to Base.Threads' @threads. The package features multiple schedulers (Dynamic, Static, Greedy, Serial) for controlling work distribution, task-local storage mechanisms for efficient parallel computation, and protections against common multithreading pitfalls like boxed variable capture. The architecture is modular with separate modules for implementation, schedulers, tools, and types.
AsyncBluetooth is a Swift Package Manager library that brings Swift Concurrency to CoreBluetooth. It wraps the central manager and peripheral delegate APIs into async/await methods and AsyncStreams, so clients can scan, connect, discover services and characteristics, read/write values, and subscribe to notifications without nested delegate callbacks. It is not a standalone application; it is a dependency library for Apple-platform apps performing Bluetooth Low Energy central-role work. Architecturally, the code is split into CentralManager and Peripheral layers, with supporting types for scan data, services, characteristics, and events. A notable internal component is CentralManagerContext, a serialized async work queue that guarantees per-key operation ordering and supports cancellation. CoreBluetooth callbacks are translated into typed event enums such as CentralManagerEvent and exposed as AsyncStreams. The library uses os.log for diagnostics and ships a privacy manifest, indicating modern Apple platform practices. Maintenance is active: the repository has recent commits and a 6.2.2 tag. The code uses current Swift concurrency features, has no third-party dependencies, and includes tests. Technical drift is low.
Spice is a Zig library for low-overhead parallelism using heartbeat scheduling. It provides a fork/join model where workers maintain local work queues and a heartbeat thread periodically signals workers to offload work to others. The design avoids common work-stealing pitfalls: dynamic dispatch is minimized by using static calls for local work, queues are truly local (no atomics for push/pop in common case), and spinning is eliminated by using blocking waits. The library is demonstrated with a binary tree sum benchmark showing sub-nanosecond overhead. While primarily a research project with noted limitations (lack of tests, no array support), the implementation exhibits high craftsmanship in its concurrency primitives and performance optimizations.
This repository is a Rust library providing structured concurrency primitives for async programming. It offers operations such as `join`, `race`, `try_join`, `race_ok` for futures, and `merge`, `chain`, `zip` for streams, supporting tuples up to 12 elements, arrays, and `Vec` (with alloc feature). It also includes `FutureGroup` and `StreamGroup` for dynamic collections, and a `ConcurrentStream` trait for processing streams concurrently with backpressure and bounded concurrency. The library is runtime-agnostic (works with tokio, async-std, smol, etc.) and supports `no_std` environments. The code extensively uses pin projection, `ManuallyDrop`, and custom waker arrays with bit-set readiness tracking to achieve efficient polling and cancellation. It provides benchmark comparisons against `futures-rs` demonstrating competitive performance. There are no data pipelines, notebooks, or research elements; this is a pure library for async concurrency.
Fetch is a Scala library for simple and efficient data access, built on cats-effect. It provides a monadic abstraction (`Fetch[F, A]`) that automatically optimizes data fetching through batching, caching, deduplication, and parallel execution. Users define data sources by implementing the `DataSource` trait, specifying how to fetch individual identities or batches. The library then composes fetches using standard monadic and applicative combinators, transparently batching requests to the same source and running independent fetches concurrently. It supports custom caches, optional fetches, error handling, and debugging via a separate `fetch-debug` module. The architecture is a pure library with no runtime dependencies beyond cats-effect, making it suitable for both JVM and Scala.js. Key entry points include `Fetch.apply`, `Fetch.run`, `Fetch.runLog`, and `Fetch.runCache`. External dependencies are minimal: cats-effect, cats-core, and scalatest for testing.
janus is a Python library that provides mixed sync-async queues for communication between threaded code and asyncio code. The core architecture centers on a single `Queue` class that internally manages both synchronous and asynchronous interfaces via proxy objects (`_SyncQueueProxy` and `_AsyncQueueProxy`). It uses thread-safe conditions (`threading.Condition`) for sync operations and asyncio conditions (`asyncio.Condition`) with careful cross-thread notification via `loop.call_soon_threadsafe`. The queue supports standard FIFO, LIFO (`LifoQueue`), and priority (`PriorityQueue`) variants through a template method pattern (overriding `_init`, `_put`, `_get`). Lifecycle management includes graceful and immediate shutdown with dedicated exception types (`SyncQueueShutDown`/`AsyncQueueShutDown`) compatible with Python 3.13+. The library is production-stable, has no external dependencies beyond the standard library, and is thoroughly tested across multiple Python versions and concurrency scenarios. It does not expose APIs beyond queue operations and is strictly a communication primitive.
This repository is a comprehensive collection of iOS demonstration projects covering design patterns, data structures, Swift language features, iOS frameworks, and software engineering principles. Each demo is a self-contained Xcode project or Swift playground that illustrates a specific concept through working code. The collection serves as an educational resource for iOS developers learning various aspects of iOS development, from basic Swift syntax to advanced frameworks like Core Animation and Combine. While individual demos vary in complexity and polish, they collectively provide valuable reference implementations of common iOS development patterns.
The chans package is a Go library that provides a set of generic channel operations for building concurrent pipelines. It offers functions for filtering, mapping, reducing, batching, windowing, de-duplication, and routing data through channels. Each function is designed to be composable, allowing developers to construct complex data processing flows by combining these building blocks. The package stands out for its consistent handling of context cancellation across all functions, ensuring that pipelines can be gracefully terminated. A key insight in the implementation is the use of internal helper functions (forEach, whileTrue, untilErr) that abstract the common pattern of iterating over a channel with context awareness. This reduces boilerplate and ensures that every function correctly handles cancellation and channel closure. The Merge function, which fans in multiple input channels using goroutines, is another example of careful concurrency management. Designed to be unopinionated and flexible, chans gives developers full control over channel lifecycle and concurrency patterns. Unlike some other concurrency libraries, it does not impose specific goroutine patterns or error handling strategies, instead providing low-level primitives that can be adapted to various use cases. The package has zero external dependencies beyond the Go standard library, making it easy to integrate into any Go project.
This repository is a full-stack self-hosted media download manager and library preparation layer centered on yt-dlp. The backend is implemented in Python using aiohttp, SQLite (via SQLAlchemy), and includes a structured feature-based architecture (auth, presets, tasks, conditions, downloads, streaming, notifications, ytdlp integration). The frontend is a Nuxt 3 / Vue 3 single-page application with comprehensive i18n support. Core capabilities include automated download scheduling with cron-like task definitions, conditional filtering, Cloudflare challenge solving, real-time WebSocket updates, streaming via on-the-fly HLS transcoding with hardware acceleration fallback, and a browser extension for quick URL submission. The codebase demonstrates good engineering practices: event bus for decoupled communication, singleton-based service containers, repository pattern for data access, custom migration framework, and extensive async test coverage. Notable external dependencies are yt-dlp (core downloader), ffmpeg (transcoding), curl_cffi (impersonation), and apprise (notifications). While the architecture is modular and well-organized, there is some code duplication across CRUD repositories and migration files, and tight coupling to yt-dlp internals via custom patches. The project is actively maintained with frequent commits, a large test suite, and clear containerization support.
MiniRust is a formal specification of an idealized subset of Rust, known as MiniRust, with an executable model defined in a custom specification language (specr). The repository provides tooling that translates real Rust MIR (via rustc) into MiniRust and runs it through a reference interpreter. It includes a comprehensive test suite (minitest) covering pass, panic, and undefined behavior scenarios, along with utilities for program construction and pretty-printing. The work is squarely a formal-semantics research project, not a production application. It models pointer provenance, aliasing (Tree Borrows), concurrency, and data-race detection, and is primarily used to validate the Rust memory model. The codebase is well-structured with clean abstractions (pluggable memory model, builder API) but depends heavily on unstable rustc internals and has many incomplete features (e.g., floats, operators, casts).
This repository is a curated collection of low-level design (LLD) and machine coding round solutions, primarily targeting interview preparation. It contains over 15 self-contained subprojects, each modeling a classic system design problem such as chess, elevator control, Uber ride booking, Splitwise expense splitting, parking lot, stock broker, task scheduler, Kafka message queue, in-memory key-value store, and more. Each subproject follows a consistent architecture with domain models, repository interfaces with in-memory implementations, service classes, and often a Main or Demo class for standalone execution. The code heavily employs design patterns like Strategy, Factory, Repository, and Observer, and demonstrates concurrency handling with locks, atomic variables, and thread-safe collections. The collection is not intended for production deployment; all state is volatile and stored in-memory. While the quality is uneven across subprojects, many exhibit clean separation of concerns and extensible design. The repository serves as a practical study resource for object-oriented design, with problem statements and video tutorials linked in the README. Some subprojects have multiple iterations (e.g., Kafka from simple to production-grade) showing evolution, but this also introduces duplication and occasional inconsistencies in naming and package structure. Despite the lack of automated tests and incomplete implementations in a few areas, the overall codebase demonstrates solid craftsmanship for educational purposes. A handful of modules—such as the distributed cache with consistent hashing, the circuit breaker for resilience, the order matching engine, and the heap-based feed fetch strategy—are particularly well-isolated and could be extracted for reuse in other projects with minimal adaptation.
This repository implements a lightweight gRPC connection pool for Go applications. The library provides a thread-safe pool of gRPC client connections that can be reused across multiple goroutines, with configurable pool size, idle timeouts, and maximum connection lifetimes. It manages the full lifecycle of connections including creation, reuse, expiration, and cleanup. The implementation handles edge cases such as connection health checking, automatic replacement of stale connections, and proper error handling for timeouts and pool exhaustion. The core abstraction consists of a Pool struct that manages a channel of ClientConn wrappers, which track connection metadata and pool membership.
C++那些事 (CPlusPlusThings) is a comprehensive Chinese C++ learning repository that aggregates code examples, tutorials, and practical exercises covering basic to advanced C++ topics. The repository is structured as a monolithic collection of self-contained C++ source files organized by topic areas including basic language features (const, static, virtual, pointers), modern C++ features (C++11/14/17), design patterns, STL source code analysis, concurrency, and coding idioms. The project uses Bazel as its build system and includes both Chinese and English documentation. The codebase primarily serves as an educational resource rather than a production application. Each topic area contains multiple .cpp files demonstrating specific C++ concepts through minimal, focused examples. The repository includes practical exercises organized as a 10-day practice series, key exercise collections, and analysis of STL internals like vector, list, hashtable, and rb_tree implementations. The design patterns section covers singleton (with multiple thread-safe variants), producer-consumer, and other classic patterns. The architecture follows a flat, topic-based organization where each directory represents a C++ concept or feature area. Most files are standalone examples that can be compiled independently using the provided Bazel BUILD files. The repository demonstrates moderate code quality with clear examples but limited production-grade error handling or comprehensive testing. The content appears to have been actively developed through 2019-2020 based on commit dates, with the last commit in May 2026 suggesting some ongoing maintenance.