{"id":13880425,"url":"https://github.com/celluloid/reel","last_synced_at":"2025-07-16T16:31:49.420Z","repository":{"id":2455807,"uuid":"3427405","full_name":"celluloid/reel","owner":"celluloid","description":"UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server","archived":true,"fork":false,"pushed_at":"2018-08-21T16:17:23.000Z","size":650,"stargazers_count":590,"open_issues_count":44,"forks_count":85,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-07-05T08:40:41.833Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://celluloid.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/celluloid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-13T05:22:56.000Z","updated_at":"2025-06-05T18:42:28.000Z","dependencies_parsed_at":"2022-09-09T01:00:23.624Z","dependency_job_id":null,"html_url":"https://github.com/celluloid/reel","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/celluloid/reel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celluloid%2Freel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celluloid%2Freel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celluloid%2Freel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celluloid%2Freel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celluloid","download_url":"https://codeload.github.com/celluloid/reel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celluloid%2Freel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265251872,"owners_count":23735048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:03:01.637Z","updated_at":"2025-07-16T16:31:49.390Z","avatar_url":"https://github.com/celluloid.png","language":"Ruby","readme":"![Reel](https://github.com/celluloid/reel/raw/master/logo.png)\n=======\n[![Gem Version](https://badge.fury.io/rb/reel.svg)](http://rubygems.org/gems/reel)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/celluloid/reel/master/LICENSE.txt)\n[![Build Status](https://secure.travis-ci.org/celluloid/reel.svg?branch=master)](http://travis-ci.org/celluloid/reel)\n[![Maintained: no](https://img.shields.io/maintenance/no/2016.svg)](https://github.com/celluloid/celluloid/issues/779)\n\n\u003e \"A dizzying lifetime... reeling by on celluloid\" _-- Rush / Between The Wheels_\n\nReel is a fast, non-blocking \"evented\" web server\nbuilt on [http_parser.rb][parser], [websocket-driver][websockets],\n[Celluloid::IO][celluloidio], and [nio4r][nio4r]. Thanks to Celluloid,\nReel also works great for multithreaded applications\nand provides traditional multithreaded blocking I/O support too.\n\n[parser]: https://github.com/tmm1/http_parser.rb\n[websockets]: https://github.com/faye/websocket-driver-ruby\n[celluloidio]: https://github.com/celluloid/celluloid-io\n[nio4r]: https://github.com/celluloid/nio4r\n\nConnections to Reel can be either non-blocking and handled entirely within\nthe Reel::Server thread (handling HTTP, HTTPS, or UNIX sockets),\nor the same connections can be dispatched to worker threads\nwhere they will perform ordinary blocking IO.\nReel provides no built-in thread pool,\nhowever you can build one yourself using Celluloid.pool,\nor because Celluloid already pools threads to begin with,\nyou can simply use an actor per connection.\n\nThis gives you the best of both worlds: non-blocking I/O for when you're\nprimarily I/O bound, and threads for where you're compute bound.\n\n### Is it any good?\n\n[Yes](http://news.ycombinator.com/item?id=3067434)\n\nDocumentation\n-------------\n\n[Please see the Reel Wiki](https://github.com/celluloid/reel/wiki)\nfor detailed documentation and usage notes.\n\n[YARD documentation](http://rubydoc.info/github/celluloid/reel/master/frames) is\nalso available.\n\nFramework Adapters\n------------------\n\n### Rack\n\nA Rack adapter for Reel is available at:\n\nhttps://github.com/celluloid/reel-rack\n\n### Webmachine\n\nThe most notable library with native Reel support is\n[webmachine-ruby](https://github.com/seancribbs/webmachine-ruby),\nan advanced HTTP framework for Ruby with a complete state machine for proper\nprocessing of HTTP/1.1 requests. Together with Reel, Webmachine provides\nfull streaming support for both requests and responses.\n\nTo use Reel with Webmachine, add the following to your Gemfile:\n\n```ruby\ngem 'webmachine', git: 'git://github.com/seancribbs/webmachine-ruby.git'\n```\n\nThen use `config.adapter = :Reel` when configuring a Webmachine app, e.g:\n\n```ruby\nMyApp = Webmachine::Application.new do |app|\n  app.routes do\n    add ['*'], MyHome\n  end\n\n  app.configure do |config|\n    config.ip      = MYAPP_IP\n    config.port    = MYAPP_PORT\n    config.adapter = :Reel\n\n    # Optional: handler for incoming websockets\n    config.adapter_options[:websocket_handler] = proc do |websocket|\n      # websocket is a Reel::WebSocket\n      websocket \u003c\u003c \"hello, world\"\n    end\n  end\nend\n\nMyApp.run\n```\n\nSee the [Webmachine documentation](http://rubydoc.info/gems/webmachine/frames/file/README.md)\nfor further information\n\nRuby API\n--------\n\nReel aims to provide a \"bare metal\" API that other frameworks (such as Rack\nand Webmachine) can leverage. This API can also be nice in performance critical\napplications.\n\n### Block Form\n\nReel lets you pass a block to initialize which receives connections:\n\n```ruby\nrequire 'celluloid/autostart'\nrequire 'reel'\n\nReel::Server::HTTP.supervise(\"0.0.0.0\", 3000) do |connection|\n  # Support multiple keep-alive requests per connection\n  connection.each_request do |request|\n    # WebSocket support\n    if request.websocket?\n      puts \"Client made a WebSocket request to: #{request.url}\"\n      websocket = request.websocket\n\n      websocket \u003c\u003c \"Hello everyone out there in WebSocket land\"\n      websocket.close\n    else\n      puts \"Client requested: #{request.method} #{request.url}\"\n      request.respond :ok, \"Hello, world!\"\n    end\n  end\nend\n\nsleep\n```\n\nWhen we read a request from the incoming connection, we'll either get back\na Reel::Request object, indicating a normal HTTP connection, or a\nReel::WebSocket object for WebSockets connections.\n\n### Subclass Form\n\nYou can also subclass Reel, which allows additional customizations:\n\n```ruby\nrequire 'celluloid/autostart'\nrequire 'reel'\n\nclass MyServer \u003c Reel::Server::HTTP\n  def initialize(host = \"127.0.0.1\", port = 3000)\n    super(host, port, \u0026method(:on_connection))\n  end\n\n  def on_connection(connection)\n    connection.each_request do |request|\n      if request.websocket?\n        handle_websocket(request.websocket)\n      else\n        handle_request(request)\n      end\n    end\n  end\n\n  def handle_request(request)\n    request.respond :ok, \"Hello, world!\"\n  end\n\n  def handle_websocket(sock)\n    sock \u003c\u003c \"Hello everyone out there in WebSocket land!\"\n    sock.close\n  end\nend\n\nMyServer.run\n```\n\nSupported Ruby Versions\n-----------------------\n\nThis library supports and is tested against the following Ruby versions:\n\n* Ruby (MRI) 2.0, 2.1, 2.2, 2.3\n* JRuby 9000\n\nContributing\n------------\n\n* Fork this repository on GitHub\n* Make your changes and send us a pull request\n* If we like them we'll merge them\n* If we've accepted a patch, feel free to ask for commit access\n\nLicense\n-------\n\nCopyright (c) 2012-2016 Tony Arcieri. Distributed under the MIT License. See\nLICENSE.txt for further details.\n","funding_links":[],"categories":["Ruby","Web Servers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelluloid%2Freel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelluloid%2Freel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelluloid%2Freel/lists"}