digital-fabric/polyphony

Fine-grained concurrency for Ruby

C

660

1,765 commits

updated Mar 25, 2024

See the code

See what people are saying

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.

concurrency
io-uring
iouring
libev
networking
polyphony
ruby
ruby-fibers
structured-concurrency

digital-fabric/polyphony

Fine-grained concurrency for Ruby

C

660

1,765 commits

updated Mar 25, 2024

See the code

See what people are saying

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.

concurrency
io-uring
iouring
libev
networking
polyphony
ruby
ruby-fibers
structured-concurrency

Project health

Overall

2.8/10

Maintained

0/10

Code review

0/10
OpenSSF Scorecard

RubyGems

Latest release

1.6 · Aug 5, 2023

Releases this year

0

Significant stargazers

Samuel Williams

1,434 followers · starred Dec 2019

Benoit Daloze

493 followers · starred Jul 2020

Guillermo Iguaran

708 followers · starred Jun 2023

Kir Shatrov

508 followers · starred Jul 2020