-
Notifications
You must be signed in to change notification settings - Fork 87
Support to use Reel with rack applications #3
Conversation
Fixes specs in rbx-2.0.0-dev.
class Configuration | ||
attr_reader :options | ||
|
||
DEFAULT_RACKUP = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to specify a value here for DEFAULT_RACKUP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, that's an old constant I no longer use, the default value is already in DEFAULT_OPTIONS.
I've just removed it.
Thanks Ryan!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I just reviewed the pull request. Looks great!
Looks good to me! I'll see if I can get it merged today |
Thanks! |
My pleasure, it's an awesome project! I am working on fixing the specs and will do a pull request later. |
Cool, I did some refactoring last night and that's why they're broken. Perhaps they could use a mock connection object for the tests? |
I'm able to start my app with rails s reel, but the first request never finishes and after a few more requests everything just hangs. I am also not able to shut down the server without forcibly killing. I tested this on a new/blank rails app and I had the same outcome, though the new rails app did shut down with Ctrl+C after a long time. Is rack support not ready yet? What's missing that I might help with? Thanks! I'm pretty excited to give this a shot. |
Running Rails on top of Reel is probably a bad idea, at least until Ruby 2.0. This is because Celluloid uses Fibers and they have small stacks (4kB) whereas Rails and the Rack middleware it uses expects big stacks. Ruby 2.0 will bring with it configurable fiber stack sizes, at which point Fibers on Rails might be a slightly less bad idea ;) That said, yes the Rack adapter is a bit half-baked and I expect it has some bugs. |
Thanks, that really helps. I look forward to Ruby 2.0! :) |
Basic Session Handler API (work in progress)
The server simply delegates rack request to a pool of Reel::RackWorkers which include Celluloid, and so each operates in its own thread.
I've also added a simple option parser to change server configuration from the command line. These are the implemented options:
To use with rails, just add the reel gem to your Gemfile and start the server with
rails s reel