10 tips on how to prevent business value risk
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Robert Bazinet on Dec 19, 2008
The Ruby on Rails team has been busy moving Rails to the next level with the adoption of Rack. The implementation of Rack allows developers to use many available middleware pieces in their applications. This addition has allowed the Rails team to create Rails Metal, a wrapper around the generic Rack middleware which sits in front of a Rails request with access to Rails sessions. Metal is meant for applications that need to be very fast and process hundreds of applications per second.
David Heinemeier Hansson announced Rails Metal on the Ruby on Rails blog and describes an example of its use:
For this scenario, we’ve built a thin wrapper around the generic Rack middleware and given it a place in the hierarchy along with the name “Metal”. Rails Metal is meant for things like the Campfire poller service, which is doing hundreds of requests per second and needs to be really fast and is at the same time really simple (2 database calls and returning a string). This service is currently written in C, but we’ll look into converting it to Rails Metal instead.
Jesse Newland also posted a blog entry describing Rails Metal as a micro-framework with the power of Rails and had this to say:
After the recent work to replace Rails’ crufty request processing code with Rack and integrate its middleware support, Rails Metal is a logical progression that allows Rails apps to use the power of Rack middleware to create super-fast actions.
Jesse provides an example of the typical “Hello World” application using Metal compared to the normal Rails controller:
class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[[200], {"Content-Type" => "text/html"}, "Hello, World!"]
else
[[404], {"Content-Type" => "text/html"}, "Not Found"]
end
end
end
Normal Rails controller:
class OldPollerController < ApplicationController
def poller
render :text => "Hello World!"
end
end
The code is clearly very different, with a simple benchmark showing Metal 25x faster than the controller code.
InfoQ caught up with Joshua Peek of the Rails Core team and the developer behind Rails Metal to find out some details about this promising new technology.
When asked what Rails Metal is, Joshua said:
Rails Metal applications are tiny little application-specific end points that are built for speed. They can run along side your Rails
application in the same process, which means it really easy to evelop, or they can be deployed standalone.
On determining what types of problems is Rails Metal meant to solve:
Metal is meant to build little tiny services that need to be able to do hundreds of requests per second.
Rails Metal is new and not meant for everyone, so the question of what Metal means to the average Rails developer:
Though its really easy for any Rails developer to start building metal applications, it is a very sharp tool. Rails developers should still continue to use Rails as they normally do, but when they are sure that a specific action requires extra performance, the tools are available.
Metal may seem like a natural use of the latest Rack implementation but the reason for its creation may not be, Josh explains:
We wanted to give developers the best of both worlds. Rails gives you a full stack MVC framework with everything you need to build a real application, but still allows you to drop down to the "metal" when you need the most speed possible.
It is interesting looking at Merb-Core and possibly comparing it to Metal. It turns out the two are pretty different:
Merb is a full MVC framework. However, Metal bits are extremely bare bones. Its simply the Rack API. You are given a raw request environment hash, and you just need to return a status code, headers, and a response body. There is no notion of a controller or view. Its up the developer to implement the minimal amount of code they see fit.
We hear a lot about micro-frameworks and the niche they fill. Metal is used in the same breath by Jesse Newland referring to other “micro-frameworks”, we asked Joshua if Metal would remove the need for other micro-frameworks:
No. There is still room for micro-frameworks like Sinatra that make it dead simple to whip up a simple API handler. In fact, you can actually use Sinatra as a metal application. Since Sinatra is built on Rack, it pretty much just works.
Finally, on the subject of how developers could get Metal:
Its already available now on Edge Rails. Otherwise you can wait for the next gem release of Rails, which will be 2.3.
Rails Metal has gotten a lot of attention with its announcement. It shows some great promise to Rails applications needing some speed. More information about Rails Metal can be found on the Ruby on Rails blog as well as at the GitHub repository where Rails is made available.
Agile Development: A Manager's Roadmap for Success
Fair Trade Software Licensing - A Guide to Neo4j Licensing Options
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.
Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.
Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.
Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?
Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.
No comments
Watch Thread Reply