May 2010 Archives

Today I managed to set up my grails environment in such a way that it triggered deadlocks quite easily when stressed with a simple jmeter script. While this was unintentional, it did give me an opportunity to diffuse some ticking time bombs.

A few of the deadlocks were caused by some of the creative ways that my project uses the Groovy on Grails APIs for rendering pages from GSP code stored in a database, and with some tweaks most of those were resolved.

Some other deadlocks, though, seem to be the fault of Groovy itself. A quick google search turned up over 300 hits relating to deadlocks in the Groovy bug tracker:

http://www.google.com/search?hl=en&q=site:jira.codehaus.org+%2Bgroovy+%2Bdeadlock

This is when I had a sad.

I know that as an open source project if a bug really bothers me, I should submit a patch, which I am likely to do, but even if I find fixes for some of the deadlocks I’m facing, I’ll either have to wait for the changes to make it into the Groovy codebase, Groovy to release, grails to pick up the changes, etc. or I’ll have to hack the patch into my application and hope for the best.

Hopefully I’ll find some magic work around that does not tickle these bugs :)

Update: Someone must have seen this blog entry, or maybe they’re just cool. Anyway, they fixed this problem wicked fast: http://jira.codehaus.org/browse/GRAILS-6398 Grails continues to rock as a result.

0 Votes

Tablet computing is one technology that I’ve been attempting to early-adopt for years, but it’s never quite been there. What I’ve always dreamed of is the PADD device that everyone walked around with in Star Trek TNG: A small, light, sleek, multifunctional device that accepts pen input, accepts touch input, and is reasonable to carry around.

Around 2003 I purchased a Toshiba m200. It was a hybrid Windows XP Tablet computer. It had a keyboard but could also be converted into tablet mode. The operating system was a clunky afterthought on Windows XP, but it did have one shining star in the product offering (and it was not stupid marble game). It was OneNote. At the time everything Microsoft made seemed clunky and over-complicated, but OneNote did everything that made sense, and nothing else. It was, and still is, a great product.

I stopped using it, though. The application was great, but the operating system and hardware were just not there yet. Also people kept asking me why I was drawing on my laptop (since tablet computers were still fringe).

Now its 2010. Everyone has heard of the iPad. Tablet computing has gone mainstream but there does not seem to be a single killer OneNote like application for the iPad. This may have something to do with the lack of an included stylus. This void, however, can be filled using a combination of applications.

First off, you’ll need a system for organizing those notes. This is where Evernote comes in handy. The interface is clean, it supports cool features like automatic geotagging and you can even attach voice sound clips to your notes. Even better than OneNote, it supports automatic synchronization between all sorts of devices. It’s pretty mature, and has been around for awhile, but the iPad is the killer device for this service.

Unfortunately, since it started as a web browser / desktop application, Evernote does not yet allow you to scribble those quick notes. On the bright side it does allow you to email content to your primary notebook, and this is the trick.

For your stylus sketches and note taking, go grab a copy of Penultimate. Of the dozen or so drawing / sketching / scribbling apps I’ve tried, this one is by far the best. Input is clean and precise. It is also the only one I’ve found that works while your wrist is rested on the screen, which makes scribbling a lot more comfortable.

Once you’re done with that scribbled note in penultimate, use the ‘email this note’ feature to fire it off to Evernote. A quick synchronisation and there it will appear in your notebook.

It’s not perfect yet, and it’s a bit awkward, but it works well enough for me!

0 Votes

Joyent uses OpenSolaris zones for its accelerators. At some point I needed to verify the physical memory size of one of these zones but was unable to use the webmin tool that Joyent provides. This seemingly simple operation was actually pretty tricky to figure out. Here are the steps I followed:

 
$ sudo rcapadm -E
                                      state: enabled
           memory cap enforcement threshold: 0%
                    process scan rate (sec): 15
                 reconfiguration rate (sec): 60
                          report rate (sec): 5
                    RSS sampling rate (sec): 5
$ rcapstat -z 1 1
    id zone            nproc    vm   rss   cap    at avgat    pg avgpg
    46 foo            -    0K    0K 2048M    0K    0K    0K    0K
$ sudo rcapadm -D
                                      state: disabled
           memory cap enforcement threshold: 0%
                    process scan rate (sec): 15
                 reconfiguration rate (sec): 60
                          report rate (sec): 5
                    RSS sampling rate (sec): 5
$ 

rcapadm seems to be a resource management tool. I’m not sure if there’s an impact to leaving it running, but I disabled it just in case.

0 Votes