Awesome
Monix
<img src="https://monix.io/public/images/monix-logo.png?ts=20161024" align="right" width="280" />Asynchronous, Reactive Programming for Scala and Scala.js.
Overview
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 interact cleanly 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, and is one of the parents and implementors of Cats Effect.
<a href="https://typelevel.org/"><img src="https://monix.io/public/images/typelevel.png" width="150" style="float:right;" align="right" /></a>
A Typelevel project, Monix proudly exemplifies pure, typeful, functional programming in Scala, while being pragmatic, and making no compromise on performance.
Highlights:
- exposes the kick-ass Observable, Iterant, Task, IO[E, A], and Coeval data types, along with all the support they need
- modular, split into multiple sub-projects, only use what you need
- designed for true asynchronicity, running on both the JVM and Scala.js
- excellent test coverage, code quality, and API documentation as a primary project policy
Usage
- Use monix-jvm-app-template.g8 for quickly getting started with a Monix-driven app
- See monix-sample for a project exemplifying Monix used both on the server and on the client.
Library dependency (sbt)
For the stable release (compatible with Cats, and Cats-Effect 2.x):
libraryDependencies += "io.monix" %% "monix" % "3.4.1"
Sub-projects
Monix 3.x is modular by design. See the sub-modules graph:
<img src="https://monix.io/public/misc/dependencies.svg" alt="Sub-modules graph" />
You can pick and choose:
monix-execution
exposes the low-level execution environment, or more preciselyScheduler
,Cancelable
,Atomic
,Local
,CancelableFuture
andFuture
based abstractions frommonix-catnap
.monix-catnap
exposes pure abstractions built on top of the Cats-Effect type classes; depends onmonix-execution
, 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
Documentation
See:
API Documentation:
Related:
Contributing
The Monix project welcomes contributions from anybody wishing to participate. You must license all code or documentation provided with the Apache License 2.0, see LICENSE.txt.
You must follow the Scala Code of Conduct when discussing Monix on GitHub, 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:
<a href="https://www.patreon.com/bePatron?u=6102596"><img label="Become a Patron!" src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="40" /></a>
Adopters
Here's a (non-exhaustive) list of companies that use Monix in production. Don't see yours? Submit a PR ❤️
- PITS Global Data Recovery Services
- Abacus
- Agoda
- AVSystem
- commercetools
- Coya
- DigitalGenius
- E.ON Connecting Energies
- eBay Inc.
- Eloquentix
- Hypefactors
- Iterators
- Netflix
- Sony Electronics
- Tinkoff
- Zalando
- Zendesk
License
All code in this repository is licensed under the Apache License, Version 2.0. See LICENSE.