Sunday, March 22, 2009

Techtarget's Java ServerSide Symposium 2009 Impressions

Just got back from Vegas where between Wednesday and Friday a small-ish java conference was taking place. This was my second one, the first being five years ago in 2004.

Of course it's hard not to compare, and I find myself doing it anyway... I can't help but feel that the excitement has left java server software. Remembering one of the very first java conferences in Sydney 1995, when it was still almost academic and less of an industry conference, I feel like we've come to an end of an era.

The tedious reality of maintaining enormous enterprise systems built over the the last decade has sinked in, and unfortunately there is nothing exciting about it, but everything difficult and complex. Those less fortune whose systems took advantage of EJB1 and EJB2s will suffer the most, as those are dying technologies and are rapidly being replaced by simpler more component friendly software.

The first set of simplification came with frameworks over the last five years - Spring and Hibernate being the most notable. Now the simplifications are being pushed out across language boundaries, because of the need to stay competitive against exploding Ruby on Rails community, and even smaller but still disproportionally more productive frameworks like Django, when compared to java.

Several talks focused on jRuby, and I think this is where the future power lies. Combining the two platforms, Ruby on Rails for web development, and server side java for multi-threaded, asynchronous, transactional behavior seems like a fantastic opportunity.

However nobody is yet talking about how this all works together in production. What does it mean to run a multi-app server distributed java application, with a RoR application hosted inside JVM and interacting with the service layer? What if service layer mixes ActiveRecord and Hibernate? Questions like this, while entirely logical in early evaluations of emerging technologies, were simply beyond the depth of TSSJS09.

But for what it's worth, there was a decent overview of a multitude of scripting languages: javascript, ruby and scala, and a very impressive talk on Ruby meta programming.

There were several exciting news for me personally, the first having to do with Flex and BlazeDS integration in Spring 3.0. Basically what this means is that it's now possible to build a typically modular and well understood server-side backend architecture in Spring, the client side in Flex, and have them directly converse over binary AMF protocol, which is highly compressed and optimized to send data back and force. I believe the entire stack is free, except Flex Builder Eclipse-based tool that's not free. My exposure to Flex is minimal, but I love the ability to build beautiful application UIs that run consistently within the browser, and expose your backend in a way of clearly defined REST/XML api. And the load time in demos appeared significantly faster compared to java RMI applications I've had experience working with.

I'll add part II in a couple of days.

Friday, February 6, 2009

Binary PostgreSQL installer broken when used on RedHat EL5.3 / Dell PowerEdge 2950: Hangs server reboot.

This is a very quick post that would hopefully save someone else hours of hitting the head on the wall like I did. If you are installing RedHat Enterprise Server 5.2/5.2 x86_64 on Dell PowerEdge server, be aware of the following issue with PostgreSQL binary installer offered by EnterpriseDB.

After installation the server is unable to cleanly shutdown due to the fact that the binary installer does some voodoo with libtermcap - basically making this system library be used from inside postgres installation folder. Because of this, kernel can not umount /usr (or whenever your PostgreSQL is installed) and hangs the shutdown.
Solution:
Build PostgreSQL from the sources. They are ahead in minor version number anyway.
Thanks.

Tuesday, August 19, 2008

The Magic of Outdoor Raving

The campout happened, and it was an enormous success, everyone seemed to have had particularly special time this year, and I have to join the ranks. Check out just the insanely intricate lighting show put up by the Radiant Atmospheres crew.

I was involved in two music sets this year - a Friday evening downtempo set by PolyGroovers (with live appearance by Telene and briefly Fabienne), and then Sunday morning solo live set. The PolyGroovers stuff had many new tracks from the upcoming album, so that set won't be available for download, but the morning set is below:

LeftCtrl Live at Friends and Family Music Campout XII @ Willits CA (109Mb, 74min)

The above set has two songs composed together with Kem (Filip Jach), and one with Joseph Lee of Progress/SF.

Please feel free to download and leave your feedback as comments!

Thursday, July 24, 2008

PolyGroovers are back!

Tonight we are packing up and going camping for the weekend, to a music campout in Willits, where we'll be performing live on Friday night. A full mixed set will be published here next week. Very exciting stuff, and as a bonus I've got a new song to share...

This is an extended mix, which is why it's 8 minutes long, and meant to be played live. The album version will be much shortened.

Please feel free to leave comments with your feedback. Much appreciated!

Thursday, July 17, 2008

Tell Your Mana About Obama, and Obama Car Art

Obama's Potential Presidency

There is plenty of excitement around Barack Obama's potential presidency, and I think there's a lot to be excited about. There's is an overwhelming feeling among people I talked to in San Francsisco, how Obama is "Our President" — not a poster boy for old money or a powerful family. The fact that the Internet fund-raising helped Obama to compete and win against the Clinton clan is a testament to the truly new era, a more democratic one, where if someone can fire up a lot of people they can rally up quckly and effectively. This efficiency is something to look forward to, if and when Obama becomes a President.

Whether or not all the people behind Obama will continue to support him, is another question. People tend to idealize their heroes way to quickly, and that's also dangerous. The recent backlash of liberal bloggers about Obama's compromise vote — is a great example. Politics is still politics, and nobody ever gets their way all the time. Everyone must compromise at some point.

But enough said, I think that overall Obama is a great candidate, and will hopefully bring a new fresh perspective into the Washington. So, how do we get there? Well, donating money is, for once, a very easy thing to do thanks to http://barackobama.com. But now there are other ways.

Car Art Contest

Infectious.com (the company I work for) is running an open contest for Car Art Submissions around Obama. There are some restrictions - some specific words can not be used, but it's an amazing opportunity for artists around United States to create Obama Car Art that can be seen by thousands of people commuting daily in the next few months before the election. This is as grass roots as it gets.

If you know any artists that may be interested please send them to Infectious. Or you can grab the banner above and put it up on your blog. Either way - thank you!

Tuesday, June 17, 2008

Firefox3 PR Backfires?

After announcing to the world that Firefox 3 will be available at 10am PDT today, June 17th, amidst apparent publicity stunt to generate the record number of downloads per day (has anyone been really keeping a tally?) the web site http://getfirefox.com/ returns the pathetic

Http/1.1 Service Unavailable

Firefox is certainly a decent browser, but it's stability seems to have gone reversely proportional to the self-professed greatness and the size of their publicity stunts.

Safari is now by far the best looking, and fastest browser for Windows, and it has been that way for mac for a while.

Good luck Fifefox 3 (when we see you), but I for one, am not buying it.

Update @ 12:23pm

OK, so finally FF3 is available for download, and I have it installed and running. The first thing is that not all plugins are compatible, and if you are using FireBug for web development, you must install the 1.1 version available here.

Wednesday, June 11, 2008

Infectious.com launches!

It finally happened :) I've been working for Infectious.com since about July last year, and it's been a really fun run building a brand new product, from a mere conception to this moment - full public launch.

Click to go to Infectios.com

Of course some people may have caught the glimpse of this from TechCrunch article a few weeks ago. Nevertheless, here it is - Car Art For the Masses - available to you from a spanking new website, designed and developed by the Team Infectious and yours truly.

The idea of course is simple - everyone's car looks the same! OK, so some are dirtier than others, some stink more, all of this is certainly true, but from an aesthetic point of view, if you and your neighbor accidentally buy the same model of a car, you are screwed! Well, not really, and especially not anymore.

Stop wasting time and go get some cool art for your car, make it look like nobody else, even if you drive a stinky dirty '74 Datsun. I'm seriously.

Tuesday, April 22, 2008

Aptana - Please Don't Suck Any Harder

I wrote this post after hours of frustration, trying to fix my broken environment, and losing valuable time on a project that was falling behind.

I now realize that the post was overly emotional, and probably not entirely fair to the Aptana team. I'll post updates here as I work through the issues to get my RadRails working again.

Thursday, March 13, 2008

Car or Auto Make-Model-Year Database : For Breakfast

Make Model What?

If you like me were tasked with loading a database of recent car makes/models/years, you would start by looking on the web and seeing if someone else just has it out there, readily available, hopefully for free, but perhaps for a tiny nominal fee.?

If only it was that simple...

I looked and looked, and couldn't find anything that would fit the above requirements. So I thought, who would know about US car models better than Kelly Blue Book? So I went on their site, and sure enough they have a javascript file that lists all known to them makes and models of used cars. Since the file is public, I figured it's not really "evil" if I scrape and parse it for my own benefit. Disagree? Have a better source? Then leave a comment.

Anyway, to cut the long story short, I'm hoping to save a day or so to someone else who may, like me, be looking for this information. The ruby module shown below retrieves and parses the javascript from KBB site into a Ruby data structure of the following form - basically a hash, keyed on make, then on model with list of years as a value:

>> Constants::Auto::DB.keys.sort[0..5]
=> ["AMC", "Acura", "Alfa Romeo", "Audi", "BMW", "Bertone"]
>> Constants::Auto::DB["Subaru"].keys.sort[0..5]
=> ["B9 Tribeca", "Baja", "DL", "Forester", "GL", "GL-10"]
>> Constants::Auto::DB["Audi"]["A4"]
=> ["1999", "2007", "1998", "2006", "2005", "1996", "2004", "2003", "2002", "1997", "2001", "2000"]
>> Constants::Auto::DB["BMW"]["X5"]
=> ["2003", "2002", "2001", "2000", "2005", "2007", "2006", "2004"]

The idea is that you could load the initial hash: @models = KBB::Parser.new.to_hash and then save the output of @models.inspect in your local constants file - hence me using Constants::Auto::DB (I actually have a Rake task for doing this -- let me know if I should post it too). Then you would just re-run this every time you think new car models are added/changed on KBB. Realize, that hitting their site every time you need the data is clearly evil. So use this class to load the data initially, save the result of inspect() call into a ruby file, and use that cached version in your app. Re-run the load every time you want to update your database.

Please let me know if you find this code useful, or if you find a better/cleaner/more comprehensive way of maintaining car make/model/year database.

#
# author: Konstantin Gredeskoul © 2008
# license: public domain
#
require 'net/http'
require 'uri'

module KBB
 MODELS_URL = "http://scripts.kbb.com/kbb/ymmData.axd?VehicleClass=UsedCar"

 class Models
   def initialize(js)   
     @models = {}
     @makes = {}
     n = /ymUsed_\[\d{4}\]\s*=\s*'([^']+)'/
     m = /ymmUsed_\["(\d+)~(\d+)"\]\s*=\s*"([^"]+)"/
     js.split(/\n/).each do |line|
       next if line.strip.blank?
       if matched = n.match(line)
         matched[1].split(/,/).each do |token|
           id, name = token.split('|')
           @makes[id.to_i] = name
         end
       end
      
       if matched = m.match(line)
          year, make_id, models = matched[1], matched[2], matched[3]
          models.split(/,/).each do |t| 
            id, model_name = t.split('|')
            make_name = @makes[make_id.to_i]
            @models[make_name] ||= {}
            @models[make_name][model_name] ||= []
            @models[make_name][model_name] << year
          end
        end
      end
    end
    
    def to_hash
      @models
    end
  end

  class Parser
    def initialize
      @m = Models.new(Net::HTTP.get(URI.parse(MODELS_URL)))
    end
    def to_hash
      @m.to_hash
    end
  end

end

Tuesday, December 4, 2007

Beaches, Aussies and Christmas

It's been a little quiet here, as things were a little busy towards the end of November, and now I am away on a short trip to Australia visiting my family, relaxing and sun-bathing on fantastic beaches of Queensland, while sipping overpriced Jameson whiskey :)

Australian Christmas is in full effect, with enormous pines towering over hot beaches fully decorated in typical X-Mas crap, while in the former hippie town Byron Bay pines are dressed with shiny peace signs.

Australians just had an election, where labor party (a weak parallel of US Democratic party) have won -- a welcome change of government after 11 years of Liberals and John Howard (smart, but creepy suck-up to George Bush). The new power has immediately ratified Kyoto protocol in their first week "at the wheel". It's refreshing to see reusable green bags at the supermarkets here, just as they are becoming a norm in San Francisco.

A weird fact discovered today -- capitalism does not mean the demand is satisfied with supply. Beach mats are not heard of in Byron Bay - a beach town with $50 beach towels. There's a few things Australia can learn from third world Thailand, where beach mats were everywhere.

Signing off for now, but stay tuned, as I'm planning a PostgreSQL performance tuning post in a few weeks. This seems like a subject not well covered widely, not sure why.