Skip to content

digital-fabric/polyphony

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
bin
 
 
 
 
 
 
ext
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Polyphony
Polyphony

Fine-Grained Concurrency for Ruby

Ruby gem Tests MIT License

DOCS | EXAMPLES

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

  • Co-operative scheduling of concurrent tasks using Ruby fibers.
  • High-performance event reactor for handling I/O events and timers.
  • Natural, sequential programming style that makes it easy to reason about concurrent code.
  • Abstractions and constructs for controlling the execution of concurrent code: supervisors, cancel scopes, throttling, resource pools etc.
  • Code can use native networking classes and libraries, growing support for third-party gems such as pg and redis.
  • Use stdlib classes such as TCPServer, TCPSocket and OpenSSL::SSL::SSLSocket.
  • Competitive performance and scalability characteristics, in terms of both throughput and memory consumption.

Documentation

The complete documentation for Polyphony could be found on the Polyphony website.

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.