Re:Introducing the Rails API Project
by bretthopper on Thursday November 22, 2012 @02:14PM
(#4819725)
Would be interesting to see some simple benchmarks comparing a base JSON only Rails app with Rails::API.
[ Parent
| on HN ]
Re:Introducing the Rails API Project
by steveklabnik2 on Thursday November 22, 2012 @02:16PM
(#4819727)
The problem with benchmarks is that they don't really correspond to reality. Your app is not a simple test app. Your site will not be running on my MacBook Air. Your users won't have the usage patterns my script does.
IMO you shouldn't do the benchmark. Let this project be a starting point for a Rails api project and/or a how to for people who want to customize Rails for their needs.
"We are building an API. Rails has extra components which aren't used but might cause overhead. Here is how to remove it."
I think that's a valid enough use-case.
Re:Introducing the Rails API Project
by bretthopper on Thursday November 22, 2012 @02:28PM
(#4819749)
Of course. It's not about showing some absolute numbers that users can expect. It's just about showing the potential overhead of a full Rails app vs Rails::API. I'd think this would be a reason why people would chose Rails::API over just Rails.
The README itself says Rails::API is faster, so not sure why a simple benchmark to back that up isn't a good idea.
edit: It really boils down to another way to visualize the overhead vs just listing what's been removed.
This is true, but they're better than nothing.
A bad benchmark is worse than nothing
What is bad about the OP'd suggest benchmark?
I'll just leave this here: http://www.youtube.com/watch?v=xEJ1n13soWU
Re:Introducing the Rails API Project
by senthilnayagam on Friday November 23, 2012 @12:49AM
(#4821108)
I have been using rails-api for over a month in a large project, this is port of a older rails app, empirical evidence app loads faster and memory footprint is small, as dependencies are less.
I have made some additional changes,
i use it with RABL, test suite is now separate and uses curb/faraday as API client. I am also considering repacking all my gems to make bundle install faster and a smaller size for standalone installations
Re:Introducing the Rails API Project
by paulbjensen on Thursday November 22, 2012 @02:17PM
(#4819730)
I agree. In fact, what would be really cool is to have a Single Page App's front-end as a template spec against which to compare different framework's performances against, a bit like what TODO-MVC did with client-side JS frameworks.