High-performance concurrent data structures for the JVM, supplementing the Java standard library.
JCTools is a Java library that provides high-performance concurrent data structures, specifically queues, which are not available in the standard JDK. It solves the need for efficient, lock-free multi-threaded communication in applications where the built-in Java collections fall short on performance or concurrency patterns.
Java developers building high-throughput, low-latency systems such as networking frameworks, data processing pipelines, or real-time applications that require optimized multi-producer/multi-consumer queues.
Developers choose JCTools for its proven performance, stability, and adoption by major projects like Netty and RxJava. It offers a free, open-source alternative with specialized queue implementations that outperform standard JDK options in concurrent scenarios.
JCTools provides a collection of concurrent data structures that are missing from the Java Development Kit (JDK). It offers high-performance, lock-free queues and utilities designed for demanding multi-threaded applications, used by major frameworks like Netty and RxJava.
MessagePassingQueue with relaxed offer/peek/poll for performance trade-offs and batch drain/fill methods for higher throughput.Unsafe (default), Atomic (using AtomicFieldUpdater), and Unpadded (reduced memory footprint) versions.JCTools focuses on delivering excellent performance at zero cost (free under Apache 2.0 License) while maintaining stability and community-driven development.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers wait-free or lock-less implementations that benchmark faster than JDK concurrent queues, as evidenced by adoption in high-throughput frameworks like Netty and RxJava.
Supports SPSC, MPSC, SPMC, and MPMC queue variations, catering to diverse multi-threaded scenarios with optimized designs for different producer-consumer configurations.
Provides unpadded queue versions to reduce false sharing and minimize memory footprint, balancing performance with resource usage.
MessagePassingQueue interface includes drain and fill methods for high-throughput batch processing, reducing contention and improving throughput in demanding applications.
Widely used by major projects like Netty, indicating reliability and community trust, with steady updates and issue tracking on GitHub.
Default implementations rely on sun.misc.Unsafe, an internal JVM API that may not be portable across all Java versions or vendors, risking future compatibility.
For zero-dependency projects, requires shading or manual jar inclusion via Maven/Gradle plugins, adding build step overhead as noted in the README's 'ShadeJCToolsSamples' reference.
Beyond the brief README, detailed usage guides are sparse, with discussion primarily on GitHub issues, which can hinder quick onboarding.
Some implementations are in experimental modules and may not be stable for production, with potential breaking changes or bugs as development evolves.