Skip to content

luikore/nyara

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 28, 2013
484ba92 · Dec 28, 2013
Aug 16, 2013
Sep 30, 2013
Sep 8, 2013
Aug 26, 2013
Aug 15, 2013
Jul 7, 2013
Aug 16, 2013
Jul 7, 2013
Aug 16, 2013
Aug 18, 2013
Jun 28, 2013
Aug 19, 2013
Aug 16, 2013
Dec 28, 2013

Repository files navigation

NOTE

This repo is obsolete. The main point of event based IO is less memory for concurrent connections, and pay less time in CPU context switching, thus leading to higher performance benchmarks. But in real the heavy computation remains in ORMs like active record, the saved CPU time is insignificant while the implementation requires complex tweaks.


ニャラ is Not Yet Another Ruby Async web framework and server.

Build Status

  • Very few runtime dependencies, faster than any web framework on rack.
  • Nonblock but no callback hell, very low CPU and memory usage.
  • Simple usage, and you don't have to make everything non-block.
  • Prefork production server, with signal-based management which enables graceful restart.
  • Route actions with scanf-like DSL.
  • Simple request format matcher.
  • Optimized render and layout helpers, easy to stream the view.

Getting started

Requirement

  • System: BSD/Linux/Mac OS X
  • Interpreter: Ruby 2.0.0 or higher
  • Compiler: GCC or Clang

Install

gem ins --pre nyara

Edit a file, name it nyahaha.rb for example

require 'nyara'
get '/' do
  send_string 'hello world'
end

And start server

ruby nyahaha.rb

Document

Participate

Caveats

  • Not based on rack.
  • Not compatible with eventmachine. It won't work if you add gems like em-synchrony.
  • Not yet another ruby async framework, some features in a common async IO framework are not implemented.
  • Doesn't and won't work on JRuby or lower versions of Ruby.
  • Doesn't and won't work on Windows.

License

BSD 3-Clause, see copying

Contributors