QCon: Interviewed by Fabio Akita

Posted by Nick Sieger Mon, 24 Nov 2008 18:51:00 GMT

Fabio Akita played the role of the Energizer Bunny, making a blur around the hallways at QCon. He managed to catch me on Thursday morning, and we had a great chat.

Fabio Bunny

Go check out our conversation on Akita On Rails to hear my take on JRuby and Rails 2.2 and more. Thanks for doing the interview Fabio!

Tags , , ,  | no comments

QCon Wrap-up: Enterprise, Have You Met Ruby?

Posted by Nick Sieger Sun, 23 Nov 2008 08:51:03 GMT

This year’s QCon San Francisco conference was my first time attending, and it was an eye-opener for me for several reasons.

First, the tutorial Ola and I gave on Monday went well, though I was mildly surprised to find that only about 10% of the attendees at our talk had any familiarity with Ruby. This turned out to work just fine as we were able to adjust and fill in a little bit of the back story on both Ruby and Rails. Still, to try to convey a sense of Ruby, Rails, and JRuby all in the span of a 2.5 hour session is a tall order!

Next, I was impressed with the diversity the conference organizers were able to achieve. There were tracks on agile development, cloud computing, REST, DSLs, design and clean code, Ruby, functional programming, real-world architectures, storage rethinking, and more. Tracks were relevant and topical even if the quality of talks was mixed.

The last item relates to my perception that Ruby is not yet seen as a worthwhile tool for enterprise software development. It leaves me with some cause for concern, though it reflects more on the state of the industry rather than on the way Ruby was presented at the conference itself.

What does it mean for Ruby to be “ready for the enterprise”? Does that imply JRuby? Running on the JVM or a Java application server, or even .NET? Reams of XML? Presence of buzzwords, such as JMS, Spring/Hibernate? Or ability to adapt to or leverage legacy code? All of these?

I would argue that Ruby already has everything it needs to be a successful enterprise software development platform, even without using JRuby. Ruby has a mature standard library, a large and ever-growing list of gems and extensions, and a vibrant community. Testing tooling, certainly seen more and more as a critical piece of software development, is also an area where Ruby excels (and brings a strong culture bias toward testing as well). Add JRuby to the mix and the ability to leverage existing infrastructure as well as code, and the picture gets even stronger. Best of all, Ruby the language is a malleable medium perfectly suited for gluing enterprise components together, creating DSLs on top of stable layers and remaining clean enough to be eminently readable and maintainable. Yet behind-the-firewall deployments appear to be elusive; if they do exist, they’re small, isolated apps that work so well, the community doesn’t hear about them. Judging from the low level of participation in Ruby-related talks at QCon, I’m inclined to believe the former.

I was speaking with Jay Fields about this topic on Friday. Jay also noticed that the the Ruby and DSL tracks were sparsely attended. (For that matter, so was the functional programming track.) His observation was that the track content was not marketed and tailored enough toward toward solving enterprise-class problems, or being approachable enough in that regard. We can certainly do better.

Do we have an issue here? Are we, the Ruby community, being too insular and not concerning ourselves enough with bringing Ruby-based solutions to the enterprise? Or perhaps businesses are waiting for more organizations that can provide services, support and indemnification? Does there need to be a Ruby, Inc. (or even a JRuby, Inc.) that looks at common enterprise problems and devises best-of-breed solutions (a sort of SpringSource for Ruby) for things like enterprise integration, security and identity, reporting, business workflow, decision support, etc. ad infinitum? Ruby should be able to do all of those while bringing the increased agility and productivity that we’ve all experienced.

I seem to have raised more questions than I am able to answer at this time. Of course, the obvious answer is that adoption of Ruby will just need more time, but I’m not willing to accept that as the only reason. I’d love to hear your opinions on contributing factors and what can be done to mitigate them. It seems like there’s a huge opportunity waiting to be tapped to help make Ruby more enterprise-worthy.

And yet, despite the less-than-stellar turnout for Ruby at QCon among conference attendees, I still had a great week, and would go back again. QCon is a fun and well-organized event overall, and I got the impression that the folks present were on the leading edge of “the enterprise”, which is exactly the people we need to engage to bring about growth in adoption of Ruby. For that reason, I hope we can kick it up a notch and take another shot at pimping Ruby at the next one. Maybe I’ll see you there!

Tags ,  | 12 comments

Redesign!

Posted by Nick Sieger Sun, 23 Nov 2008 07:10:41 GMT

I finally did it. I ditched the old, crufty Typo theme in favor of one hand-crafted by yours truly. I’m by no means a professional web designer, but I’m happy with what I ended up creating. It’s relatively clean, the colors are a little edgy, and it took less that forever thanks to blueprint and kuler. Let me know if you have any feedback!

2 comments

Project Kenai: Open for Business

Posted by Nick Sieger Sun, 19 Oct 2008 18:30:52 GMT

Project Kenai

Project Kenai has been open for business for over a month, and I’m just writing about it now?

Project Kenai

Blogging is hard. Let’s go shopping, m’kay?

barbie
http://www.flickr.com/photos/zen/1229934/
on flickr

There’s no excuse for not writing until now about the JRuby on Rails project that’s kept me busy at work since I joined Sun almost 18 months ago. (Ok, there are a few lame ones. Twitter. Conference travel. Presidential political news distractions. Also, Tim’s write-up filled in my side of the story immediately after the launch.)

So, better late than never. Actually, by looking back on the first month of operation I think that I can give you a better idea of where we’re going, supported by what we’ve done (as well as what we haven’t done), rather than what I might have said we’re going to do.

Word of Mouth

One thing we haven’t done is put the heavy Sun marketing blitzkrieg operation to work on our behalf. Word has made its way around the blogs, and even onto a few tech news sites, but we’re still in a growth phase for the project, and we’d rather earn respect quietly through a site that people find useful instead of shouting the word from the mountain tops.

We have established that we intend to embrace change, having deployed three additional releases since launch. During that time, we’ve added a new feature, fixed bugs and UI inconsistencies, and worked on performance and infrastructure issues.

kenai-database

We’ve also seen community participation grow. We’ve had over 2100 people join, 79 projects have been created, and we’re starting to see real activity in those projects. These are modest but respectable numbers.

JRuby on Rails

As you’ve heard, kenai.com runs on JRuby and Glassfish and uses bits of software I’ve worked on like activerecord-jdbc, Warbler and JRuby-Rack. Having worked on JRuby itself and Rails support for JRuby for a couple years now, this is a personal validation of all that work. One of the things I’ve relished the most working on Project Kenai for the past year is to be able to build infrastructure software for and based upon real-world use. The JRuby story continues to get stronger every day, with things like thread-safety in the upcoming Rails 2.2 release adding fuel to the fire.

(Not Yet) More Than Just a Forge

One of the things that might have caught your eye when you came to the site is the slogan More Than Just a Forge. That’s silly, you might say to yourself. What do they have here that I can’t get at another project hosting site? And if you said that, I’d heartily agree with you – the marketers are just getting a little antsy.

However, that doesn’t mean we don’t have plans. For now, we’re taking the Gmail Launch strategy, starting with a simple, solid foundation, and gradually inviting more and more to participate, stabilizing and growing the platform, and soliciting feedback from our user base. We do already have a healthy amount of requests on our UserVoice page, and while we hope to make good on a number of those, we also plan to do some new things that aren’t being done elsewhere. Stay tuned, and I hope to be able to reveal some more in the coming months as we start to roll out the implementation of those plans.

In the meantime, if you’d like an invite to create a project, drop me an email. If you have comments or requests, you can share them with me privately via email, on the site in the forums, or on our UserVoice page.

Tags , ,  | no comments

Jazzers and Programmers

Posted by Nick Sieger Sat, 19 Jul 2008 19:34:00 GMT

At RubyFringe, I could have gone the easy route and talked about any manner of tech that I’ve been working on or associated with, including JRuby, JRuby-Rack, Warbler, image_voodoo, Glassfish, activerecord-jdbc, Connection pooling for Rails, or Ruby-Processing. Instead, I took a risk and went in a completely different direction. What follows are some thoughts I expressed in the talk. I’d be interested to hear your take as well.

Jazzers and Programmers

Why do we program? Why do you program? Not the 9-5 systems analyst working for a paycheck. I’m talking about you and me; we, the passionate fringe of the programming world. Fame and fortune? A knee-jerk answer, but that’s not the one I’m looking for. What I think drives great programmers is the desire to learn, share, collaborate, and constantly get better at what you do. Which might explain, to a large degree, why all of you came to RubyFringe.

RubyFringe bills itself as deep nerd tech with punk rock spirit. So what are some elements of punk rock spirit that we identify with? While I enjoy and appreciate punk and its culture of DIY, I’m not an expert. However, I am passionate and knowledgeable about jazz.

At this point you may be shaking your head, “Sieger didn’t get the memo!”

rubyfringe kenny g

At which point I counter: if you think this clown and the music he plays is jazz, then prepare to be corrected, because you need to hear what I’m about to tell you. Listen. Jazz is punk before punk even existed. And if we’re associating ourselves with punk, the fringe, or, to use another word, vanguard, perhaps we can learn a few things from this truly unique American art form.

village vanguard

How did I pick this topic for my talk? I was thinking about the fringe, the vanguard and growing up nerdy and a misfit, which we probably all can relate to. In addition to my interest in computers, I was also a band geek. I wore ties on random days at school just to accentuate myself away from the “in” crowd. And after school, I played in the jazz band. Playing in the jazz bands continued through college, where despite my majoring (and graduating) in electrical engineering, I decided to move to New York City to experience the big city and hopefully continue to play jazz. Instead, in an odd but practical twist, NYC became my transition into a programming career. Because you gotta pay the bills somehow, after all.

Recently, after taking in David’s “Surplus” talk at RailsConf, although it sounds trite, I really took his suggestion to heart to look outside the programming world for insights on how to become a better programmer. I soon realized that jazz, my dormant passion, was that place right in front of me that might hold some of those crucial insights. And as odd as it may appear that I am speaking about jazz at a programming conference, I thought I’d share some thoughts about this from my vantage point as programmer and jazz musician. (Plus, I get a kick out of saying that I came to RubyFringe, stood up in front of a captive audience, and auditioned jazz clips for 30 odd minutes.)

Styles of Jazz

It’s taken me all my life to learn what not to play. – Dizzy Gillespie

Jazz as a unique musical style is incredibly diverse. Its history spans over a hundred years, and is remarkable in its breadth. From Ragtime, New Orleans “Hot” Jazz, Swing, Bebop, Cool, Hard Bop, Free/Avant Garde, Jazz Rock/Fusion to splintering into a thousand directions, the music was (and is) constantly evolving and changing with the times.

The history of programming is undergoing a similar arc, but is nowhere near as developed as a communication medium as jazz is. Whereas modern programming only 40-50 years old depending on when you start counting, jazz was just getting a head of steam at that point. You could break it down like this: C is akin to New Orleans “hot” jazz: foundation for much that followed, and still relevant in a lot of ways, but definitely showing its age. Java is like swing (literally! c.f javax.swing.*): appeals to the masses, anyone gets it without a lot of cognitive load. Ruby is like bebop: favors minimalism, more powerful, more intellectual, and less understood.

So what does that mean for the future of programming? We’re already seeing an increase in DSLs, polyglotism, and languages and tools used for specialized purposes. I would expect that trend to continue, and using the development of the many styles of jazz as a ruler, would say that there will not be a Next Big Language (NBL). Specialization and niche skills will be increasingly important as differentiators in our careers, but that means there will also be plenty of opportunity to stake out that new ground for ourselves and become leaders in these new specializations.

Jazz Fundamentals

Anyone can make the simple complicated. Creativity is making the complicated simple.” – Charles Mingus

Jazz as a creative medium has a number of compelling features that surround the music itself as well as the players. Let’s examine a few of these, using them as a mirror to reflect on programming.

Instrumentation. The modern jazz small ensemble is built upon the rhythm section -- piano, bass, and drums. The bass is the starting point, and is responsible for marking the beat as well as laying the harmonic foundation, often by “walking”. Because of this critical role, the bass player in a jazz band is almost always positioned in the rear-center of the stage, between the piano and the drums. The piano and drums also have a role in keeping time, but have more freedom in creating tension and dissonance by layering rhythms on top of the bass, in an activity known as Comping.

The easiest parallel to programming is libraries, frameworks and patterns. These are the building blocks upon which we code. A well-designed library makes your work as a programmer easier and more enjoyable in the same way a solid, experienced rhythm section complements a soloist.

To use an example from web programming, may I suggest Bass-Drums-Piano == Model-View-Controller?

m-v-c

When you hit a wrong note it’s the next note that makes it good or bad. – Miles Davis

Musical Structures. Much of bebop and straight-ahead jazz employs the well-established structure of the head, followed by solos, and finally repeating the head. The head is basically a crib sheet that consists of a tune or melody (usually a well-known jazz standard) and a set of chord changes that forms the harmonic basis for the entire piece. During the solo section, one or more musicians improvise over the changes for one or more “choruses”.

blue-monk

The 12-bar blues is easily the most common form found in jazz. It is usually the first form that a budding jazz musician practices when learning how to improvise.

Every working jazz musician is expected to memorize and be able to play a large number of tunes and harmonic structures. This body of tunes is exemplified by the Real Book, an underground, illegal transcription of a large number of tunes by some Berklee College students in the 70’s that has become a standard part of a jazz musician’s toolbox.

Collectively, these musical conventions and rules form a jazz vocabulary and a shared ritual that allow musicians to play together in a jam session without having played together before.

The takeaway is that conventions and standards, when organically grown, tend to be powerful, liberating forces for communication and collaboration. There was no OASIS- or W3C-like committee that sat down when the roots of jazz were taking hold and dictated that it would be played this way. It just happened, night in, night out, on bandstands and in sessions all over New Orleans and Chicago and New York.

I believe that some of the best examples of programming and technology embody those same ideas. Certainly Rails is a shining example in the programming world of such a set of conventions and how they allow you to be productive no matter what Rails project you’re working on.

It was when I found out I could make mistakes that I knew I was on to something. – Ornette Coleman

Improvisation. Making it up as you go. Jazz wouldn’t be jazz without improvisation. The whole concept of improvisation in jazz builds upon the conventions and structure, but gives you the license to do whatever you want. Improvisation is what turns those constraints into freedom. Conviction is the key. Get up and play, tell your story, tell it with conviction, and there will be no wrong notes.

Improvisation is also where the musical conversation happens. Where the soloist connects with the crowd and his/her fellow musicians. As a listener, following along with that conversation sometimes takes a trained ear. But there are still some musical devices that are easy for anyone to appreciate and can give you something to listen for.

Trading fours is a conversational device between players in the group. Most commonly, it’s used to give the drummer a chance to stretch out by alternating four bars of soloing with one or all of the instrumentalists. It’s a great way to enjoy the inventiveness of the group collaboration element of jazz by listening to how the soloists play off each other in short spurts.

An outstanding example of trading fours can be found in “The Blues Walk” between Clifford Brown and Harold Land (at about the 5:30 mark in the tune). They trade fours for two choruses, then twos, then ones, then halfs. The lines they weave are unreal!

Quoting is humor and inventiveness applied to improvisation. It’s named for a device where a player spontaneously inserts a recognizable melody into the middle of a solo. It’s basically easter eggs applied to jazz. Dexter Gordon and Sonny Rollins are two players known for their penchant for breaking out and quoting in the middle of a solo.

Improvisation and Programming

Learn the changes, then forget them. – Charlie Parker

As far as programming is concerned, it’s harder to see how improvisation can translate. Chad Fowler recently posted about programming as performance, asking for examples. Unfortunately, most of the examples given use programming as a means, but with some form of multimedia art as the end. I’d like to see programming performance where the code itself is the end result.

Do programmers improvise? I certainly believe that the best ones do. While it may be hard to capture the spontaneity of pure, real-time improvisation in a way that maps to how we write code, I think we can get close.

Continuous rewrites. Consider Fred Brooks’ axiom, “Plan to throw one away; you will, anyhow.” Jazz musicians do this on the bandstand every night! What if, rather than throwing one away, you rewrote a non-trivial piece of code five, ten, twenty times? What do you think would come out of that exercise as a result?

Live coding as a performance and teaching mechanism. I think live coding is an awesome example of spontaneity and risk-taking in programming, and one that not enough people attempt. Have you ever looked over the shoulder of a great programmer? It’s fun to watch, because you learn a lot. I could easily sit for an hour watching a seasoned programmer create code while working in their own environment. On the other hand, there’s a trend in conference talks where the presenter, to avoid the wrath of the demo gods, stands idly by while playing back a pre-recorded video of the demo. Sorry, I don’t buy this. If it’s not live, it’s not real. Let’s make live-coding something we all strive to do! Don’t be afraid to show the audience that you’re not perfect!

Do not fear mistakes. There are none. – Miles Davis

Instead of a hackfest, try a Coding Jam Session. Hackfests only rarely unite people to work toward a common cause; people enjoy the communal feel but too often people revert to working on their own thing instead of collaborating. Sprints are better, where the general topic or project is shared but each person is still working on their separate pieces. Rather, what I’d like to see is a group of programmers working toward a single shared goal. Plan ahead for a gathering of a handful of people for a lengthy period of time, say 8 or 12 or even 24 hours. Agree upon a theme or rough plan ahead of time, but allow for serendipity and improvisation to take hold of the group during the session. Get together, and start writing code. Try “trading fours”, allowing each person in the session to drive and add their bit of code into the mix in short spurts. The overarching theme should be collaboration and building on each other’s contributions. Avoid negative responses, such as saying “No” or “Yes, but...” or taking over and deleting or substantially rewriting someone else’s code. Instead, say “Yes, and...”. Imagine yourself on the bandstand, where once a note is played, it can’t be taken back. Really try hard to put away your devil’s advocate side or need to take control and instead play up to each others’ strengths. Depending on the blend of personalities, this could be a great way to spike a idea for a new website or a startup!

Group Gitjour repository sharing. Crazy idea: what about using gitjour at a coding jam in a mode where everyone broadcasts their own repository and adds everyone else as remotes? Commit notifications could be broadcast on the local network with Growl or a similar tool, and pulling in someone else’s changes could be a simple short one-line command, or perhaps even automatic. Imagine writing code together where suddenly a git merge is done for you automatically and the text changes right before your eyes right in your editor! Real-time collaboration!

Join the conversation!

I hope you’ll join me and post your thoughts about some of these ideas, either in the comments below or on your own blogs. And find some inspiration in your passions and pastimes you have outside of the programming world that help you become a better programmer and collaborator!

Discography

Those who saw my talk in person may be interested in this list of song samples. I personally recommend any of these albums. Information is organized as Section: Artist, Song, Album.

  • Intro. Naked City, Thrash Jazz Assassin, Torture Garden.
  • Ragtime. Jelly Roll Morton, Maple Leaf Rag (Morton style), The Library of Congress Recordings, Vol. 1: Kansas City Stomp.
  • New Orleans “Hot”. King Oliver’s Creole Jazz Band, Dipper Mouth Blues, Louis Armstrong And King Oliver.
  • Swing. Duke Ellington & His Orchestra, Take The “A” Train, The Fabulous Swing Collection.
  • Bebop. Charlie Parker, Koko, The Complete Savoy and Dial Studio Recordings.
  • Cool. Miles Davis, Israel, The Birth of the Cool.
  • Hard Bop. Herbie Hancock, Watermelon Man, Takin’ Off.
  • Free. Ornette Coleman, Free Jazz, Free Jazz.
  • Jazz Rock. Miles Davis, Black Satin, On the Corner. (Also remixed on Panthalassa: The Music of Miles Davis, 1969-1974.)
  • Contemporary. The Bad Plus, Iron Man, Give.
  • Walking. Sonny Rollins, Blue Seven, Saxophone Colossus.
  • Trading Fours. Clifford Brown, The Blues Walk, Clifford Brown and Max Roach.

Update. I’ve posted a muxtape of the songs here. Enjoy! (Also, I had to substitute Focus On Sanity from Ornette’s Shape of Jazz to Come album due to the length of Free Jazz. SoJtC is an early free album, a little more digestible than FJ.)

Tags ,  | 13 comments

Blog Setup

Posted by Nick Sieger Thu, 10 Jul 2008 05:10:27 GMT

The other day several people chimed in wondering how I set up this blog with JRuby and Glassfish. One of the reasons I didn’t include the details in the post is that it’s not really much different than any JRuby/Glassfish/Warbler deployment, but in case you don’t know what that looks like, here are the basics.

Preconditions (Java)

I’m running on a Joyent Accelerator, which runs OpenSolaris, which has JDK 6 installed by default. If you’re running on some flavor of Linux, hopefully there’s a package available for you to install, otherwise you may have to download a self-extracting binary.

Install Glassfish

This step is actually straightforward; not at all as problematic as you might expect of a piece of Java technology! In the parent directory where you want Glassfish to be installed (substituting the name of the Glassfish jar you downloaded as appropriate):

java -Xmx256m -jar glassfish-installer-v2ur2-b04-sunos_x86.jar
cd glassfish
chmod -R +x lib/ant/bin
./lib/ant/bin/ant -f setup.xml

Start Glassfish.

./bin/asadmin start-domain

You may want to add GLASSFISH/bin to your path so that you can run the Glassfish asadmin command from anywhere.

On Solaris, SMF is the subsystem that is used to ensure services are started at boot time (among other things). Glassfish works nicely with SMF. On other systems, there may be /etc/rc.d init scripts out there, or you can roll your own (asadmin start-domain and asadmin stop-domain).

Install JRuby

Download JRuby and unpack it somewhere. I recommend adding JRUBY_HOME/bin to the end of your path, so it doesn’t clash with Matz-Ruby.

Install Warbler and activerecord-jdbcmysql-adapter

In addition to Warbler, I’m using the activerecord-jdbcmysql-adapter to connect to the blog’s database. Both can be installed with Rubygems:

jruby -S gem install warbler activerecord-jdbcmysql-adapter

With Rails 2 and up, the application’s config/database.yml file should be updated for adapter: jdbcmysql:

<% jdbc = defined?(JRUBY_VERSION) ? 'jdbc' : '' %>
development:
  adapter: <%= jdbc %>mysql
  encoding: utf8
  database: testapp_development
  username: root
  password:
  socket: /tmp/mysql.sock
# same for test/production...

Otherwise, you need to jump through some extra environment.rb configuration hoops.

Configure Warbler

Warbler needs to be told about any gems that your application uses. To generate a Warbler configuration file:

jruby -S warble config

The file is generated at config/warble.rb. In it, modify the following sections:

config.gems = ["activerecord-jdbcmysql-adapter"]
...
config.webxml.jruby.min.runtimes = 2
config.webxml.jruby.max.runtimes = 4

Build and deploy the .war

jruby -S warble
asadmin deploy --contextroot / blog.war

(--contextroot / makes the application rooted at / in the server, rather than at /blog which would be the default.)

At this point, the blog application is up and running on port 8080. I had previously been running the blog with an Apache/.htaccess-based setup reverse-proxying to mongrel, so all I had to do was change the port. I haven’t touched it since.

But is this right for you?

Chances are, this setup is overkill for a simple blog. If you’re going to try it, I’d recommend at minimum running on a VPS with at least 1G of memory. But once you get the core pieces in place, updating and re-deploying the application is really just as simple as the last two commands. It’s mundane and boring in its simplicity. But boring is good when you don’t want to worry about having to keep Mongrel running, or max out the memory in your server and make it unstable.

Tags , , ,  | 5 comments

Version Control + Bug Tracking Survey + NBPython

Posted by Nick Sieger Tue, 08 Jul 2008 18:10:01 GMT

At Sun, I work in the Developer Tools and Services group, home of NetBeans, Sun Studio, and a bunch of other developer-focused tools. The project I’m working on is a developer collaboration site where source code version control and bug tracking are essential components.

Of course, we can’t call ourselves programmers if we’ve never gotten into a bikeshed argument about which VC or bug tracking system is best, so we’ve set up a survey for you to vent your opinions on the topic. Check it out, just two simple questions, it will take you all of 10 seconds to respond. I’ll publish or point to results in a week or two after the number of responses has grown above level of statistical significance. Thanks in advance for your votes!

In loosely-related news, Ted Leung and Frank Wierzbicki announced at EuroPython today that Python (and Jython) will be fully supported in a future version of NetBeans, targeting the end of the year for end-user functionality. See Kuldip Oberoi’s announcement for more details.

nbpyScreen.png (PNG Image, 1152x720 pixels) - Scaled (97%)

What’s great about this is that the NetBeans team has decided to embrace an existing community effort started by Allan Davis, and they’re looking for contributors, so if you dabble in Java but would rather be writing Python, maybe you can step up and help them out!

Tags , ,  | no comments

This Blog Powered by Glassfish, JRuby and JRuby-Rack

Posted by Nick Sieger Sun, 06 Jul 2008 03:48:51 GMT

Well, the recent Ruby 1.8.6 issues, including an apparent memory leak problem that was plaguing my blog’s mongrel caused me to evaluate what should have been obvious long ago. That I should put my money where my mouth is and upgrade to JRuby on Glassfish using JRuby-Rack and Warbler.

And so it’s done.

Activerecord-jdbc-adapter 0.8.1 Released

I’m now running the blog in Glassfish V2 with JRuby 1.1.1 and JRuby-Rack 0.9 (facilitated by Warbler 0.9.9), along with activerecord-jdbc-adapter 0.8.2. Here’s to dog-fooding!

(Now if only I could find a situation painful enough to force up to re-skin this blog beyond the ancient Typo azure theme...)

Tags  | 6 comments

Activerecord-jdbc-adapter 0.8.1 Released

Posted by Nick Sieger Wed, 04 Jun 2008 21:57:00 GMT

The long-delayed and much-awaited 0.8.1 release is here. It fixes quite a few reported bugs (but not quite all). See the full changelog below for details.

Please help me make more frequent releases of ar-jdbc by submitting patches against the trunk of activerecord-jdbc. Test cases appreciated also.

File bugs in JRuby’s JIRA. Use the “ActiveRecord-JDBC” component when filing them.

You can check out the source here:

svn co http://jruby-extras.rubyforge.org/svn/trunk/activerecord-jdbc
git clone git://github.com/nicksieger/activerecord-jdbc-adapter

Recently I started keeping a mirror of activerecord-jdbc-adapter on Github. Feel free to watch or fork and send me patches via git format-patch as well.

One of the cool new things in this release is a JDBC version of sqlite3 using the Zentus Sqlite JDBC driver. The crazy thing is how the driver is created. The original sqlite3 codebase is cross-compiled to MIPS and the resulting output coverted to Java bytecode using NestedVM! The adapter is still in its early stages, but basic stuff seems to be working. Try it out using jruby -S gem install activerecord-jdbcsqlite3-adapter.

Let me know how the release works for you!

Changes in 0.8.1

  • Now sporting a JDBC sqlite3 adapter! Thanks Joseph Athman.
  • Added support for InterSystems Cache database (Ryan Bell)
  • Fix for JRUBY-2256
  • JRUBY-1638, JRUBY-2404, JRUBY-2463: schema.table handling and Oracle NUMBER fixes (Darcy Schultz & Jesse Hu)
  • Add structure dump and other DDL-ish for DB2 (courtesy abedra and stuarthalloway)
  • Fix missing quotetablename function under Rails 1.2.6 and earlier
  • Small tweaks to jdbc.rake to select proper config
  • JRUBY-2011: Fix MSSQL string un-quoting issue (Silvio Fonseca)
  • JRUBY-1977, 17427: Fix information_schema select issue with MSSQL (Matt Burke)
  • 20479: Improve gettablename for MSSQL (Aslak Hellesøy)
  • 20243: numerics improvements for MSSQL (Aslak Hellesøy)
  • 20172: don’t quote table names for MSSQL (Thor Marius Henrichsen)
  • 19729: check for primary key existence in postgres during insert (Martin Luder)
  • JRUBY-2297, 18846: retrying failing SQL statements is harmful when not autocommitting (Craig McMillan)
  • 10021: very preliminary sybase support. (Mark Atkinson) Not usable until collision w/ sqlserver driver is resolved.
  • JRUBY-2312, JRUBY-2319, JRUBY-2322: Oracle timestamping issues (Jesse Hu & Michael König)
  • JRUBY-2422: Fix MySQL referential integrity and rollback issues
  • JRUBY-2382: mysql string quoting fails with ArrayIndexOutofBoundsException

Tags ,  | no comments

JRuby Q & A at RailsConf

Posted by Nick Sieger Sun, 01 Jun 2008 22:07:33 GMT

These are the notes I took during our “panelish” Q & A session on Sunday afternoon at RailsConf.

  • Exceptions (behavior between ruby and java)

    • Embedding: JSR-223 preferred, BSF fallback
  • Java integration, mocking, proxying, extension

  • Multiple VM support

    • multiple JRuby instances can be run in the same VM
    • JavaSand (google it) -- Ola’s port of _why’s (freaky freaky) sandbox
  • Startup time performance gain recently

    • -Xbootclasspath: VM does not verify classes in the “boot” classpath
    • -Xverify:none is not recommended because of runtime-generated code
    • Nailgun to keep VM running and “send commands” to it
  • Compiling Ruby code to JVM bytecode

    • Keep # of class files low
    • Walk AST and dump out high-level, abstracted operations (local variable access, dynamic invocation) and low-level bytecode is built for each of those
    • 4096 -- maximum # of methods to be compiled
    • Compiled methods are shared between runtimes
    • Future:
    • raise/eliminate overhead of compiled methods
    • share AST, reduce memory load
  • Community tasks/actions

    • Projects needing help (e.g., ActiveHibernate)
    • Adoption, acceptance, blogging
    • Documentation (http://wiki.jruby.org/ and others), screencasts
    • Who’s using it?
  • Sun’s commitment

    • Ruby vs. Groovy vs. Python vs. Scala vs. other langs
    • Rails vs. Grails vs. Lift vs. JSF vs. Struts 2 vs. ???
    • all of the above
    • improve the JVM’s support for all dynamic languages
    • JRuby is a full open source project, not owned or controlled by Sun, with history that extends years before main devs hired by Sun
  • Ruby programming language, JRuby is an implementation

    • community evangelism of Ruby the language vs. implementations
    • despite MVM, FFI and emerging areas that are not standard yet
  • How do you pitch JRuby/Rails in a legacy environment?

    • Consider demonstrating running application without discussing technology specifics
    • IBM and JDK 1.5 issues have been reported
    • Free support as long as these issues are new and help improve JRuby and the community!
  • Testing

    • JRuby enables more agile testing
    • Without production risks
    • Ceremony vs. Essence discussion
  • Terracotta/DSO

  • Windows/Mongrel/ImageMagick issues

    • ImageVoodoo is an imaging library using Java2D, comes with Java
    • MiniMagick also reportedly works
  • Rails benchmarks

    • Micro-benchmarks are problematic and usually don’t lead to measurable application speedups
    • Community needs a real-world, full application
    • Antonio Cangiano working on new application-level benchmarks?
    • “Richards” -- Smalltalk-originated application benchmark
  • JSR-292 (“invokedynamic”)

    • Actually extension of “invokeinterface” bytecode
    • Call site structure/method handles
    • Expose the dynamic nature of the JVM (get the Java-specific stuff out of the way)
    • Language-specific calling semantics, method invocation
    • “Punching a hole” through the JVM
    • Comments on JSR-292 Early Draft Review currently ongoing

Tags , ,  | no comments

Older posts: 1 2 3 4 5 6 ... 17