All Projects → JCTools → Jctools

JCTools / Jctools

Licence: apache-2.0
jctools.github.io/jctools

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jctools

Crossbeam
Tools for concurrent programming in Rust
Stars: ✭ 4,180 (+47.55%)
Mutual labels:  data-structures, concurrency, lock-free
Spscqueue
A bounded single-producer single-consumer wait-free and lock-free queue written in C++11
Stars: ✭ 307 (-89.16%)
Mutual labels:  concurrency, lock-free
Concurrencyfreaks
Stars: ✭ 299 (-89.45%)
Mutual labels:  concurrency, lock-free
C Sharp Algorithms
📚 📈 Plug-and-play class-library project of standard Data Structures and Algorithms in C#
Stars: ✭ 4,684 (+65.34%)
Mutual labels:  data-structures, queues
lfqueue
Minimize lock-free queue ever!
Stars: ✭ 107 (-96.22%)
Mutual labels:  lock-free, wait-free
Zio
ZIO — A type-safe, composable library for async and concurrent programming in Scala
Stars: ✭ 3,167 (+11.79%)
Mutual labels:  concurrency, queues
Atomic queue
C++ lockless queue.
Stars: ✭ 373 (-86.83%)
Mutual labels:  data-structures, lock-free
lfqueue
lock-free FIFO queue by C native built it, easy built cross platform(no extra dependencies needed) , guarantee thread safety memory management ever!
Stars: ✭ 104 (-96.33%)
Mutual labels:  lock-free, wait-free
Thmap
Concurrent trie-hash map library
Stars: ✭ 51 (-98.2%)
Mutual labels:  concurrency, lock-free
Left Right
A lock-free, read-optimized, concurrency primitive.
Stars: ✭ 1,245 (-56.05%)
Mutual labels:  concurrency, lock-free
Imtools
Fast and memory-efficient immutable collections and helper data structures
Stars: ✭ 85 (-97%)
Mutual labels:  data-structures, lock-free
Xenium
A C++ library providing various concurrent data structures and reclamation schemes.
Stars: ✭ 225 (-92.06%)
Mutual labels:  concurrency, lock-free
hatrack
Fast, multi-reader, multi-writer, lockless data structures for parallel programming
Stars: ✭ 55 (-98.06%)
Mutual labels:  lock-free, wait-free
Object threadsafe
We make any object thread-safe and std::shared_mutex 10 times faster to achieve the speed of lock-free algorithms on >85% reads
Stars: ✭ 280 (-90.12%)
Mutual labels:  concurrency, lock-free
optimistic lock coupling rs
🍋: A General Lock following paper "Optimistic Lock Coupling: A Scalable and Efficient General-Purpose Synchronization Method"
Stars: ✭ 21 (-99.26%)
Mutual labels:  concurrency, lock-free
Interviews
A list of fancy questions I've been asked during the interviews I had. Some of them I ask when interviewing people.
Stars: ✭ 140 (-95.06%)
Mutual labels:  data-structures, concurrency
concurrent-ll
concurrent linked list implementation
Stars: ✭ 66 (-97.67%)
Mutual labels:  concurrency, lock-free
Awesome Lockfree
A collection of resources on wait-free and lock-free programming
Stars: ✭ 1,046 (-63.08%)
Mutual labels:  concurrency, lock-free
Important Java Concepts
🚀 Complete Java - A to Z ║ 📚 Notes and Programs of all Important Concepts of Java - OOPS, Data Structures, Algorithms, Design Patterns & Development + Kotlin + Android 🔥
Stars: ✭ 135 (-95.23%)
Mutual labels:  data-structures, concurrency
Recipe
RECIPE : high-performance, concurrent indexes for persistent memory (SOSP 2019)
Stars: ✭ 145 (-94.88%)
Mutual labels:  data-structures, concurrency

Total alerts Coverage Status Build Status

JCTools

Java Concurrency Tools for the JVM. This project aims to offer some concurrent data structures currently missing from the JDK:

  • SPSC/MPSC/SPMC/MPMC variations for concurrent queues:

    • SPSC - Single Producer Single Consumer (Wait Free, bounded and unbounded)
    • MPSC - Multi Producer Single Consumer (Lock less, bounded and unbounded)
    • SPMC - Single Producer Multi Consumer (Lock less, bounded)
    • MPMC - Multi Producer Multi Consumer (Lock less, bounded)
  • SPSC/MPSC linked array queues (bounded and unbounded) offer a balance between performance, allocation and footprint

  • MPSC/MPMC XAdd based, unbounded linked array queues offer reduced contention costs for producers (using XADD instead of a CAS loop), and pooled queue chunks for reduced allocation.

  • An expanded queue interface (MessagePassingQueue):

    • relaxedOffer/Peek/Poll: trade off conflated guarantee on full/empty queue state with improved performance.
    • drain/fill: batch read and write methods for increased throughput and reduced contention

There's more to come and contributions/suggestions are most welcome. JCTools has enjoyed support from the community and contributions in the form of issues/tests/documentation/code have helped it grow. JCTools offers excellent performance at a reasonable price (FREE! under the Apache 2.0 License). It's stable and in use by such distinguished frameworks as Netty, RxJava and others. JCTools is also used by commercial products to great result.

Get it NOW!

Add the latest version as a dependency using Maven:

        <dependency>
            <groupId>org.jctools</groupId>
            <artifactId>jctools-core</artifactId>
            <version>3.3.0</version>
        </dependency>

Or use the awesome, built from source, https://jitpack.io/ version, you'll need to add the Jitpack repository:

        <repository>
          <id>jitpack.io</id>
           <url>https://jitpack.io</url>
        </repository>

And setup the following dependency:

        <dependency>
            <groupId>com.github.JCTools.JCTools</groupId>
            <artifactId>jctools-core</artifactId>
            <version>v3.3.0</version>
        </dependency>

You can also depend on latest snapshot from this repository (live on the edge) by setting the version to '3.1.1-SNAPSHOT'.

Build it from source

JCTools is maven built and requires an existing Maven installation and JDK8 (only for building, runtime is 1.6 compliant).

With 'MAVEN_HOME/bin' on the path and JDK8 set to your 'JAVA_HOME' you should be able to run "mvn install" from this directory.

But I have a zero-dependency/single-jar project

While you are free to copy & extend JCTools, we would much prefer it if you have a versioned dependency on JCTools to enable better support, upgrade paths and discussion. The shade plugin for Maven/Gradle is the preferred way to get JCTools fused with your library. Examples are available in the ShadeJCToolsSamples project.

Benchmarks

JCTools is benchmarked using both JMH benchmarks and handrolled harnesses. The benchmarks and related instructions can be found in the jctools-benchmarks module README. Go wild and please let us know how it did on your hardware.

Concurrency Testing

mvn package
cd jctools-concurrency-test
java -jar target/concurrency-test.jar -v

Come up to the lab...

Experimental work is available under the jctools-experimental module. Most of the stuff is developed with an eye to eventually porting it to the core where it will be stabilized and released, but some implementations are kept purely for reference and some may never graduate. Beware the Jabberwock my child.

Have Questions? Suggestions?

The best way to discuss JCTools is on the GitHub issues system. Any question is good, and GitHub provides a better platform for knowledge sharing than twitter/mailing-list/gitter (or at least that's what we think).

Thanks!!!

We have kindly been awarded IntelliJ IDEA licences by JetBrains to aid in the development of JCTools. It's a great suite of tools which has benefited the developers and ultimately the community.

It's an awesome and inspiring company, BUY THEIR PRODUCTS NOW!!!

JCTools has enjoyed a steady stream of PRs, suggestions and user feedback. It's a community! Thank you all for getting involved!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].