Project

polyphony

0.21
A long-lived project that still receives updates
Fine grained concurrency for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 0.21.0
= 5.17.0
= 1.6.0
= 0.14.2
= 1.45.1
= 0.22.0
= 1.1.10
= 1.8.0
 Project Readme

Polyphony: Fine-Grained Concurrency for Ruby

Ruby gem Tests MIT License

Polyphony | pəˈlɪf(ə)ni |

  1. Music the style of simultaneously combining a number of parts, each forming an individual melody and harmonizing with each other.

  2. 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

Technical Discussion

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.