Politics, Programming and Possibilities
2 Aug
My friend Ezra has been building a new MVC framework for Ruby that I’ve suddenly become quite fond of: it’s called merb, and it’s fast. I like fast—especially now that I’ve built several Rails apps and felt the pressure mount when the app tops at 20 requests per second.
Here’s what Ezra wrote to me when I asked about performance:
Merb is a lot faster then Rails as far as routing and dispatching, filters, action calling. The whole framework is built for speed. I want the time spent during a request to spend very little time in framework code overhead and more time in your own application code. Merb does this very well. A hello world action is about 700req/sec and if you use the event driven mongrel its 1200req/sec for a single merb backend.
So merb can go very fast and has way less overhead then rails does. In rails there is a lot more to do in the framework code before it passes control and your own code gets a chance to run.
And regarding reliability in a production environment:
Merb can handle a lot more concurrent requests on one process than rails can. It can also be run in a fully multi threaded way with no mutex lock if you don’t use activerecord and instead use a thread safe ORM like Sequel. Merb processes in general use about half the ram or less of rails processes and tend to not leak like rails [sometimes] does. One guy is running a file upload type site http://dropboks.com on 4 merbs and he does 500k uploads a day and a ton of downloads. Everything is stored on s3 but proxies and streams thru merb going up and going down.
Just for the record, Ezra is working on this project in his own free time, so send him the positive remarks and please be kind if your performance or reliability isn’t exactly as quoted. As an open source project, you’re free to help out if you find any deficiencies.
As a note to myself and others, here are the gems I’ve installed for merb:
I’ve needed the following for running the tests / specs:
And from what I understand, I will need to use a thread-safe data source such as Sequel to let merb do its fantastic multithreading work:
If you’re into more control over your queries than ActiveRecord gives you, I’d recommend checking Sequel out. It’s code is full of some very neat Ruby as well as a surprising dash of semantic beauty.
2 Aug
CurrencyTrading.net has a thoughtful article on what a Ron Paul presidency would do to the U.S. dollar. The author, Jessica Hupp, weighs the risks and benefits and concludes that a move to a commodity or gold standard would be the right move in the long run.
I agree that our dollar is “on shaky ground” and that we may have some choppy times ahead, with or without the kinds of reforms that Ron Paul has advocated for 25 years. If you’re aware of the ways in which the U.S. economy is currently shifting downward, then you may feel like I do that change is inevitable. Therefore, an intentional switch back to the gold standard (with all of its short-term risks) would be far better than ignoring the fundamental problems in the economy.
If you’re curious about Ron Paul and his views on the economy, I invite you to read the aforementioned article. Taking it a step further, you might also be interested in the liberty dollar which I recently started “investing” in. I think of it as an investment in a philosophy as well as a commodity.