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 Werner Schuster on May 04, 2010
MacRuby 0.6 іs now available (MacRuby 0.6 Download Link).
As MacRuby 0.6 Release Notes say, MacRuby 0.6 is now considered stable for Cocoa development, complete with XCode and Ahead of Time (AOT) support, which means it's possible to compile the Ruby source and only ship the resulting binaries.
As announced previously, the 0.6 release now comes with experimental debugging support. MacRuby's debugging support inserts special instructions in the compiled code to trigger breakpoints, as compared to many other Ruby debuggers which use the tracing support or use Ruby VM hooks.
A note from the release blog post:
An interesting feature of the debugger is that it has been abstracted into a simple Objective-C API, of which macrubyd is just one client. In the future we might see other clients.
Comparable Java and Ruby libraries are available in the Debug-Commons project.
With MacRuby 0.5, MacRuby removed the GIL, allowing threads to run in parallel (unlike Ruby 1.9 where only one Ruby thread can run at a time). Some new improvements in 0.6 make multiple threads more useful, eg. (from the release blog post):
Finally, the Regexp class has been totally rewritten in this release. It is now using the ICU framework instead of Oniguruma for regular expression compilation and pattern matching. Since ICU is thread-safe, MacRuby 0.6 allows multiple threads to utilize regular expressions in a very efficient way, which was not possible previously.
MacRuby 0.5 already contained the beginnings of support for Grand Central Dispatch (GCD), Apple's system wide threadpool and task system available on Mac OS X Snow Leopard and on Phone OS 4.0. MacRuby 0.6 adds new features and abstractions in the 'dispatch' library.
Job offers a similar interface as Thread, and can be used to asynchronously execute code. It can be used synchronously or asynchronously. For instance, here the code to have a Job do some work and wait for the Job to finish (from the docs):
@result = job.value puts @result.to_int.to_s.size # => 51
The asynchronous way requires to pass in a callback that is called once the Job is finished; in Ruby this is, of course, done with a block:
job.value {|v| p v.to_int.to_s.size } # => 51 (eventually)
Another tool introduced in MacRuby's Dispatch library is Proxy, which allows to serialize method calls on an object.
Other features are parallel iteration, ie. parallel implementations of iterators, Enumerable#p_each, Enumerable#p_map, Enumerable#p_find, and similar methods which make use of multiple threads to execute all the block invocations.
GCD also features Event Sources, which allow to register interest in certain events and have them handled by blocks scheduled on GCD queues. Event sources can be timers, process signals, input descriptors for I/O, etc. Event Sources are a powerful tool to make use of the OS-wide thread pool by running event handlers on a queue which grabs a thread when an event comes in and releases it back to the system after the event handler was run.
The source code of the dispatch library in MacRuby has a README for a more detailed introduction to all of these GCD features in MacRuby 0.6.
One issue that was found after the release of MacRuby 0.6 seems to cause problems with scheduling a block to run on the main thread from a background thread. Something to watch out for in case of weird threading problems; the bug report contains a workaround and a solution should come to MacRuby's trunk soon.
The big question for every Ruby implementation is of course compatibility; the state in MacRuby 0.6 (from the release blog post):
MacRuby 0.6 provides support for C extensions written for the original implementation of ruby. We were able to successfully use the Nokogiri, SQLite3 and PostgreSQL extensions from MacRuby.
This release also passes about 85% of RubySpecs, is able to run a modified version of Rails 3, and implements better support for Ruby 1.9 encodings.
Finally, Matt Aimonetti is working on a book for O'Reilly; the first few chapters of "MacRuby: The Definite Guide" are already available and can be read online.
A Guide to Branching and Merging Patterns
Improve Java Garbage Collection, Runtime Execution, and JVM visibility with Zing
Monitor your Production Java App - includes JMX! Low Overhead - Free download
SCM best practices for multiple processes, releases & distributed teams
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.
No comments
Watch Thread Reply