Chymyst: declarative concurrency in Scala
Chymyst is a framework for concurrency in functional programming
based on the chemical machine paradigm, also known as Join Calculus.
The chemical machine concurrency paradigm has the same expressive power as CSP (Communicating Sequential Processes) or the Actor model.
Chymyst Core is a library that implements the high-level concurrency primitives as a domain-specific language in Scala.
Chymyst is a framework-in-planning that will build upon
Chymyst Core and bring declarative concurrency to practical applications.
The code of
Chymyst Core is based on previous Join Calculus implementations by Jiansen He (https://github.com/Jiansen/ScalaJoin, 2011) and Philipp Haller (http://lampwww.epfl.ch/~phaller/joins/index.html, 2008), as well as on my earlier prototypes in Objective-C/iOS and Java/Android.
Chymystand the chemical machine paradigm
Chymyst Core library is in alpha pre-release, with very few API changes envisioned for the future.
The semantics of the chemical machine (restricted to single-host, multicore computations) is fully implemented and tested on many nontrivial examples.
The library JAR is published to Maven Central.
Extensive tutorial and usage documentation is available.
Unit tests include examples such as asynchronous counter, parallel “or”, concurrent merge-sort, and “dining philosophers”. Test coverage is 100% according to codecov.io.
Performance benchmarks indicate that
Chymyst Core can schedule about 100,000 reactions per second per CPU core, and the performance bottleneck is in submitting jobs to threads (a distant second bottleneck is pattern-matching in the internals of the library).