Hello everyone! I am MEGA EXCITED for this release, as it's the first version in which I'm a committer. Wooo! In addition, 954 other intrepid Rubyists in total contributed to this release: http://contributors.rubyonrails.org/edge/contributors Please note that this is a beta, not an rc, so some things may be a bit wonky. Please file an issue on GitHub and I will do everything I can to help you help us iron out all the…
Proud to be on the contributor list for this one - any of you considering contributing, it's not hard at all, the team makes it really easy.
Ruby on Rails 4.0.0.beta1 released
11–20 of 91 posts
Re: Ruby on Rails 4.0.0.beta1 released
#12does threadsafe and ruby 2.0 mean we can create multiple instances with something like unicorn without forking the entire codebase?
Ruby 2.0 still has the GIL so if you want to run a threaded web server you'll still need to be using rubinius or jruby.
Even without this, there are MANY use cases where multi-threaded concurrent request dispatch makes a LOT of sense. For instance, the recent controversy about heroku routing, right?
With MRI or another interpreter with the GIL, you'd want to run one app process per CPU core -- but having each of those processes also do multi-threaded request handling can still even out latency (that is, avoid those awful ~95th+ percentile latencies in the heroku routing debacle), and increase overall throughput.
Especially if your app, like most but not all web apps, is more I/O bound than CPU bound (waiting on DB, disk, or external APIs).
Re: Ruby on Rails 4.0.0.beta1 released
#13Earlier quoted context omitted.
Proud to be on the contributor list for this one - any of you considering contributing, it's not hard at all, the team makes it really easy.
Any pointers for getting started?
If there is anything I can do to make this more clear, please let me know. Documentation is something I enjoy.
Re: Ruby on Rails 4.0.0.beta1 released
#14does threadsafe and ruby 2.0 mean we can create multiple instances with something like unicorn without forking the entire codebase?
I'm not sure what you mean by 'forking the entire codebase'. Even if Rails3, though, Rails supported multi-threaded request dispatching IF you had an app server stack that supported it. In Rails3, you just had to explicitly turn it on with `config.threadsafe!`. Rails4 makes that the default, always on. That's really the only difference. There are at least a few concurrency-related bugs that have been fixed in Rails4…
Try Jruby and Puma.
Re: Ruby on Rails 4.0.0.beta1 released
#15Earlier quoted context omitted.
Proud to be on the contributor list for this one - any of you considering contributing, it's not hard at all, the team makes it really easy.
Any pointers for getting started?
Look for places the code might not currently be clear, and try to improve clarity without changing behavior.
Once you've done that kind of thing, sky's the limit as far as I am concerned. I'm working on understanding and improving the parameter parsing behavior at the moment.
Re: Ruby on Rails 4.0.0.beta1 released
#16Re: Ruby on Rails 4.0.0.beta1 released
#17Re: Ruby on Rails 4.0.0.beta1 released
#18What is the "Rails way" of doing AJAX calls and updating the DOM? I've been embedding Backbone views in the parts of my app that are the most interactive, but I feel like there's gotta be a better way.
Personally I just use Backbone and try to structure things in whatever way seems natural. It looks like there's been a lot of work done in integrating Ember.js if you want to look into that.
Re: Ruby on Rails 4.0.0.beta1 released
#19What is the "Rails way" of doing AJAX calls and updating the DOM? I've been embedding Backbone views in the parts of my app that are the most interactive, but I feel like there's gotta be a better way.
So instead of having to deal with plenty of small ajax calls you just build an app as it would work in plain HTML and just use turbolinks to leverage AJAX.
Re: Ruby on Rails 4.0.0.beta1 released
#20What is the "Rails way" of doing AJAX calls and updating the DOM? I've been embedding Backbone views in the parts of my app that are the most interactive, but I feel like there's gotta be a better way.
According to recent discussions, turbolinks. It's built into Rails 4 and essentially works by making a call out to the server to fetch raw html and replacing some/all of the DOM with the result. Personally I just use Backbone and try to structure things in whatever way seems natural. It looks like there's been a lot of work done in integrating Ember.js if you want to look into that.
Backbone for single page mini-apps.