Awesome
<img src="https://github.com/digital-fabric/polyphony/raw/master/docs/assets/polyphony-logo.png">Polyphony: Fine-Grained Concurrency for Ruby
<a href="http://rubygems.org/gems/polyphony"> <img src="https://badge.fury.io/rb/polyphony.svg" alt="Ruby gem"> </a> <a href="https://github.com/digital-fabric/polyphony/actions?query=workflow%3ATests"> <img src="https://github.com/digital-fabric/polyphony/workflows/Tests/badge.svg" alt="Tests"> </a> <a href="https://github.com/digital-fabric/polyphony/blob/master/LICENSE"> <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"> </a>Polyphony | pəˈlɪf(ə)ni |
Music the style of simultaneously combining a number of parts, each forming an individual melody and harmonizing with each other.
Programming a Ruby gem for concurrent programming focusing on performance and developer happiness.
What is Polyphony?
Polyphony is a library for building concurrent applications in Ruby. Polyphony harnesses the power of Ruby fibers to provide a cooperative, sequential coroutine-based concurrency model. Under the hood, Polyphony uses io_uring or libev to maximize I/O performance.
Features
- Ruby fibers as the main unit of concurrency.
- Structured concurrency coupled with robust exception handling.
- Message passing between fibers, even across threads!
- High-performance I/O using the core Ruby I/O classes and io_uring with support for advanced I/O patterns.
Usage
- Installation
- Overview
- Tutorial
- All About Cancellation: How to Stop Concurrent Operations
- Advanced I/O with Polyphony
- Cheat-Sheet
- FAQ
Technical Discussion
- Concurrency the Easy Way
- How Fibers are Scheduled
- Exception Handling
- Extending Polyphony
- Polyphony's Design
Examples
For examples of specific use cases you can consult the bundled examples in Polyphony's GitHub repository.
Contributing to Polyphony
Issues and pull requests will be gladly accepted. Please use the Polyphony git repository as your primary point of departure for contributing.