OS X and Vendor Lock-in

Every now and then I find myself defending Apple and its products. Besides the unusual (over here) honor of owning two Apple computers, I’ve not indulged in any obvious Apple fandom. I like their products, and I smile when I hear OS X being compared to Windows. ๐Ÿ™‚ Regardless, one of the more stupider criticisms of late that I’ve heard is vendor lock-in and how being on OSX somehow locks your data up. This is obviously precipitated by Tim Bray’s unswitch and a couple of other related posts. This is a rebuttal.

OS X is an operating system and it does nothing special to pack your data in and hide it. “Vendor lock-in” occurs probably when you use Apple’s applications. iApps, possibly, or those bundled with the OS. Solution? Don’t use the bundled applications, or use them alongside open data stores. Let’s take my Dock. There’s Adium, which is a port of the opensource Gaim, Skype which is platform independent, Safari, which I use alongside Del.icio.us & Google Bookmarks; Netnewswire, which is an RSS reader and which syncs everything up to Newsgator, the built-in Terminal, ITunes which might take my music ratings along with it (big deal), downloading songs using Transmission, Bittorrent & XTorrent, Textmate which afaik is just a text editor, and Photo Booth, which just takes pictures and stores them as images in my Pictures folder. My email client is Gmail.

Otoh, I use the plethora of opensource tools made available to me through Darwinports: Netstumbler, wget (which is my download manager), curl, and other opensource tools like Neoffice, etc.

I can’t see no vendor lock-in here (sic). Please move on.

Barcamp Delhi Two: Quicker Web Applications

This is absurdly mixing up dates, but I thought I should put up my slides for my talk at Delhi here as well. It’s about caching, and how a simple solution can enable page caching (and its speeds) to be used in a lot of situations. You’ll need the audio of my talk as well. The title is inspired from Do Androids Dream of Electric Sheep?, a brilliant novella by Philip K. Dick. ๐Ÿ™‚

Barcamp Hyderabad Three: Eclectic Java

Just a quick note (will expand later, hopefully) to let you know that Barcamp Hyderabad 3 happened and I was there ๐Ÿ™‚ ‘Twas a fun event, and a good two days away from work.

A request to unconference organizers tho: no wifi sucks big time.

I’ve stopped working on JRuby, but I’m keeping an active RSS eye on the project. It seems very promising. Meanwhile, my slides are up on SlideShare.

Java + Ruby

I’m going to write a bit about Ruby in Java land. Much of this post stems from the Sun stall at FOSS.in: to put it mildly, it was perhaps the most enthusiastic stall I’ve seen at a conference ever. The energy of the guys there was incredible and their enthusiasm to show things off (and Sun does have a lot of nice things to show off: dtrace, ZFS, glassfish) really made me give a second glance to the entire Java + Ruby thing: JRuby, or a Ruby implementation in Java, and Rails deployment via the Java Enterprise stack. I’ve been playing around with it for a day, and I’ve got just one thing to say. It’s cool ๐Ÿ™‚

A bit of a background: I’m not a Java guy. Repeat, not a Java guy. So when people say that the Java toolset is amazing, I’ve always not understood what they meant. Who needs toolsets, widgets, a GUI, an administrative console; when you’ve got SSH & shell scripting? The last four months developing SlideShare however, have been a bit of a revelation: managing servers is a tough job. Our current stack includes a lighttpd->pound->mongrel chain, and monit to watch these processes and start them off if something goes wrong. Lots of glue code, and solutions that seem hacks now (a separate uploader mongrel, anyone?). Anyways, the role of a sysadmin sucks: big time, and the toolsets to manage a traditional *nix environment requires too much of manual work. [Stuff such as Puppet might negate this, but I digress…]. So it was kinda really nice to switch on Glassfish, drop a .war into an autodeploy directory and watch the application come alive. And have an actual GUI console to manage all this stuff, read up on the logs, configure routes & services, etc.

I’ve not done much: just installed Glassfish, played around with asadmin start-domain domain1 and the console, and then installing Jruby and the easy Java + Ruby integration. Look at this code, for e.g.:

#!/usr/bin/env jruby

require 'java'

set = java.util.TreeSet.new
set.add "foo"
set.add "Bar"
set.add "baz"
set.each do |v|
  puts "value: #{v}"
end

string = java.lang.String.new
string = "Vishnu"
puts string

Sweet ain’t it? One of Ruby’s selling points has always been that it’s easier to drop into a low level language (C) and write extensions for expensive functionality, thus negating Ruby’s slow performance. But stuff like the code sample above should make it pure nirvana for expensive operations. I haven’t compared speeds yet: I’ll do that soon using a simple Web framework like Camping & then a simple Rails app (i.e. Camping/WebBrick on Ruby and JRuby and Camping/Mongrel vs Camping/Glassfish: if I can get it running). JRuby isn’t perfect yet: Rails applications aren’t officially supported, but I hope to get a useful app deployed on localhost soon, and if there’s interest, deploy it to my slice. It’s an upward slope though for me, since the whole Java deployment scene [making a WAR] seems so bloody complicated (why, oh why?) but a good indicator for good Ruby/Rails deployment on JRuby would be to just type in rake deploy and have your code get into the whole Glassfish stack.