Giter Club home page Giter Club logo

async-rack's People

Contributors

mikz avatar rjacoby avatar rkh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

async-rack's Issues

Server handler (thin) not found.

When I start this simple server, I get an error: Server handler (thin) not found. (RuntimeError)

require 'async-rack'
require 'sinatra'

set :server, 'thin'

get '/' do
  "Hello, world!"
end

If I comment out the require 'async-rack' line, it starts Thin fine. If I comment out the set :server, 'thin' and use async-rack, it starts WEBrick.

AsyncRack does nasty things with Rack namespace

[1] pry(main)> require 'async-rack'
=> true
[2] pry(main)> require 'rack/head'
NameError: uninitialized constant Rack::Head
from /Users/jonas/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/async-rack-0.5.1/lib/async_rack/async_callback.rb:7:in `const_get'
[3] pry(main)> Rack::Head
=> AsyncRack::Head

What am I doing wrong?
Bonus:

# inserted by me before line 7 of async-rack-0.5.1/lib/async_rack/async_callback.rb
puts [namespace.constants.include?(name), namespace.const_defined?(name)]
# => [true, false]

Make a real async API instead of hacking rack

Here are a few issues I found with current approach to ruby async web stack (or lack of one), including this gem:

  • Rack is not designed with async in mind.
  • An awesome hack is still a hack, not a solution.
  • Confuse developers. Some middlewares are async, some are not.
  • throw :async scares me.
  • Various bugs and unexpected behaviors make development a pain.

Why we need a separate rack-like API for async web apps:

  • Can be designed to be async from ground up.
  • No hacks.
  • Allow future async web frameworks and async app servers to integrate and grow.
  • A very important piece in any web stack.
  • Leads to more friendly development experience.

P.s. Sorry for putting this here as an issue, I couldn't find any discussion about this possibility anywhere, so I'm trying to see if other people's opinions on this idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.