New-age Transactional Systems - Not Your Grandpa's OLTP
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Peter Cooper on Jul 28, 2006
It's well accepted that Ruby is no performance champion. It's execution speed is slower than that of similar scripting languages like Perl and Python, and significantly slower than lower-level languages like C. Ruby was designed to be a quick language to code in and develop for, but not a quick language in terms of its performance.
On the Ruby newsgroup, comp.lang.ruby, Peter Hickman started a thread suggesting "For performance, write it in C." This approach has been traditionally popular for languages like Perl, and is now becoming common with Ruby. One of Hickman's demonstrations yielded over a 100 times speed improvement between some demonstration Perl code and a C implementation, so the benefits are obvious, and as a language with a compiler on nearly every platform, C makes a good choice for a fast, lower-level language with which to write high-performance code.
With Ruby, there are two options available for using C. The traditional way is to create an extension for Ruby in C that's compiled separately and included in, like a library. You can learn how to do this in How to Create a Ruby Extension in 5 Minutes. A new approach, however, is to use the RubyInline library, a library that allows you to write C alongside your Ruby code. For small routines this is significantly quicker than going to the efforts of writing a whole library in C (though not by much), and also 'cleaner' code-wise. Some Ruby source code demonstrating RubyInline is available.
Inspired by the newsgroup thread, Pat Eyler wrote " RubyInline, Making Making Things Faster Easier" with a demonstration and benchmark results of how he used RubyInline to significantly speed up the calculation of prime numbers, and then immediately followed it up with "RubyInline: Going a bit Further". Both articles provide a good look at the performance gains possible by using inline C.
Why NoSQL? A primer on Managing the Transition from RDBMS to NoSQL
Improve Java Garbage Collection, Runtime Execution, and JVM visibility with Zing
Monitor your Production Java App - includes JMX! Low Overhead - Free download
Agile Development: A Manager's Roadmap for Success
Fair Trade Software Licensing - A Guide to Neo4j Licensing Options
I think the tutorial about creating ruby extensions in 5 minutes should be renamed somehow to: creating ruby extensions in 5 minutes (or a couple of days) :-] (for reference: additional requirements for a Ruby env and the other thread originated in this one: OneClick Installer: MinGW? or VC2005?).
From this perspective RubyInline looks very interesting.
./alex
--
.w( the_mindstorm )p.
I was hoping this was a joke, but now all I can do is laugh anyway. This takes the cake.
I give up.
Not wanting to start a flame, but I haven't caught the funny part :-[.
./alex
--
.w( the_mindstorm )p.
I agree with Alex, I'm not sure why you think this is funny.
Ruby provides decent profiling and benchmarking tools to help identify the bottlenecks in your program(s). If refactoring the Ruby for better performance doesn't help enough, the option to easily rewrite a method or two in C without having to throw away the rest of the Ruby program seems like a pretty clear win.
given that the project has been public since 2002, it is hardly new. I might also add that I was able to duplicate the 5 minute traditional effort (including editing/compiling/linking/loading/running) in about 30 seconds with much cleaner code. See my full response on the original article's page.
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
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.
5 comments
Watch Thread Reply