Asynchronous, Reactive Programming for Scala and Scala.js.
Monix is a high-performance Scala / Scala.js library for composing asynchronous, event-based programs.
It started as a proper implementation of ReactiveX, with stronger functional programming influences and designed from the ground up for back-pressure and made to cleanly interact with Scala's standard library, compatible out-of-the-box with the Reactive Streams protocol. It then expanded to include abstractions for suspending side effects and for resource handling, being one of the parents and implementors of cats-effect.
A Typelevel project, Monix proudly exemplifies pure, typeful, functional programming in Scala, while making no compromise on performance.
Highlights:
- exposes the kick-ass
Observable
,Iterant
,Task
andCoeval
data types, along with all the support they need - modular, only use what you need
- designed for true asynchronicity, running on both the JVM and Scala.js
- really good test coverage, code quality and API documentation as a primary project policy
See monix-sample for a project exemplifying Monix used both on the server and on the client.
The packages are published on Maven Central.
- Current release:
3.0.0-RC1
- Stable release:
2.3.3
For the 3.x series (that works with Cats 1.x
and Cats-Effect):
libraryDependencies += "io.monix" %% "monix" % "3.0.0-RC1"
For the 2.x series:
libraryDependencies += "io.monix" %% "monix" % "2.3.3"
Monix 3.x is modular by design, so you can pick and choose:
monix-execution
exposes the low-level execution environment, or more preciselyScheduler
,Cancelable
,Atomic
andCancelableFuture
; depends on Cats 1.x and Cats-Effectmonix-eval
exposesTask
,Coeval
; depends onmonix-execution
monix-reactive
exposesObservable
for modeling reactive, push-based streams with back-pressure; depends onmonix-eval
monix-tail
exposesIterant
streams for purely functional pull based streaming; depends onmonix-eval
and makes heavy use of Cats-Effectmonix
provides all of the above
The versioning scheme follows the
Semantic Versioning (semver) specification,
meaning that stable versions have the form $major.$minor.$patch
,
such that:
$major
version updates make binary incompatible API changes$minor
version updates adds functionality in a backwards-compatible manner, and$patch
version updates makes backwards-compatible bug fixes
For development snapshots may be published to Sonatype at any time.
Development versions have the form: $major.$minor.$patch-$hash
(example 3.0.0-d3288bb
).
The $hash
is the 7 character git hash prefix of the commit from
which the snapshot was published. Thus, "snapshots" can be used as
repeatable upstream dependencies if you're feeling courageous. NO
GUARANTEE is made for upgrades of development versions, use these at
your own risk.
See:
API Documentation:
Related:
The Monix project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with the same license that Monix is licensed with (Apache 2.0, see LICENSE.txt).
People are expected to follow the Typelevel Code of Conduct when discussing Monix on the Github page, Gitter channel, or other venues.
Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted. For more information, check out the contributor guide.
If you'd like to donate in order to help with ongoing maintenance:
All code in this repository is licensed under the Apache License, Version 2.0. See LICENCE.txt.
YourKit supports the Monix project with its full-featured Java Profiler. YourKit, LLC is the creator [YourKit Java Profiler](http://www.yourkit.com/java/profiler/index.jsp) and [YourKit .NET Profiler](http://www.yourkit.com/.net/profiler/index.jsp), innovative and intelligent tools for profiling Java and .NET applications.Development of Monix has been initiated by Eloquentix engineers, with Monix being introduced at E.ON Connecting Energies, powering the next generation energy grid solutions.