Rails in the Large: How Agility Allows Us to Build One Of the World's Biggest Rails Apps
Neal Ford shows what ThoughtWorks learned from scaling Rails development: infrastructure, testing, messaging, optimization, performance.
Tracking change and innovation in the enterprise software development community
Posted by Werner Schuster on Nov 28, 2007
Ola Bini reports that Joni, a port of Oniguruma, was merged into the JRuby trunk:This is a glorious day! Joni (Marcin's incredible Java port of the Oniguruma regexp engine) has been merged to JRuby trunk. It seems to work really well right now.JRuby team member Marcin Mielczynski took the job of porting the Oniguruma Regex engine to Java code - Oniguruma is the Regex engine included in Ruby 1.9.x.
To fix that, we integrated JRegex instead. That's the engine 1.0 was released with and is still the engine in use. It works fairly well, and is fast for a Java engine. But not fast enough. In particular, there is no support for searching for exact strings and failing fast, and the engine requires us to transform our byte[]-strings to char[] or String. Not exactly optimal. Another problem is that compatibility with MRI suffers, especially in the multi byte support.All these problems seem to be - or will be - solved with Joni. Regex performance has been a big problem in the past (e.g. see Lessons from building Oracle Mix on JRuby on Rails), but Joni seems to help with that too. Charles Nutter looked at REXML performance with the new code:
After running through a series of basic optimizations, most of the key expressions we worried about were performing as well as or much better than JRegex, so Ola went through with the conversion over the past couple days. Marcin is continuing to work on various optimizations, but both Ola and I have been playing with the new code. And it's looking great.The linked article continues with the benchmark results comparing the code before and after the merge, which shows significant speed ups with the Joni code.
We've been thinking about [including Oniguruma] already. There are few reasons:
Threading: Oniguruma uses global locks when initializing code range tables or managing shared AST nodes (like Character Class hashtable). Oniguruma bytecode interpreter also uses thread locks (it can be turned off but we get it for free in java land, and it'd be a hack to mix foreign threading with java one).
Exceptions: it would be hard to recover from segfaults. Converting Oniguruma errors to Ruby exceptions would also be an ugly hack.
JNI: it requires data separation, so all strings/bytes would have to be copied.
Additional binary distribution: good luck compiling it one Mainframe :D
Agile Development e-Kit: Educational Content from Rational
Agile Development: A Manager's Roadmap for Success
Consolidation and Virtualization Are NOT Enough: The Case for Non-x86
The 5 Mandates of Software Development Teams - Presto Manifesto
JBoss versus IBM WebSphere: Cost, Performance, Efficiency, Innovation (IBM wins)
Neal Ford shows what ThoughtWorks learned from scaling Rails development: infrastructure, testing, messaging, optimization, performance.
Stuart Halloway discusses Clojure and functional programing on the JVM in depth, and touches on the uses of a number of other modern JVM languages including JRuby, Groovy, Scala and Haskell.
Orion Henry and Blake Mizerany talk about the technology behind Heroku and the benefits of the new add-on system.
Chris Riley presents security issues threatening service based systems, examining security threats, presenting measures to reduce the risks, and mentioning available security frameworks.
This talk investigates technical issues encountered when moving to an Agile process.
Don Box and Amanda Laucher present “M”, a declarative language for building data models, domain models or external DSLs. Don Box's demos show some of M’s features and latest changes of the language.
It is four months since the SOA manifesto was announced; InfoQ interviewed the original author’s to get insight into the motivations and the process behind the initiative.
This article explains the impact memory barriers, or fences, have on the determinism of multi-threaded programs.
No comments
Watch Thread Reply