Saturday, January 31, 2009

More notes on switching my development system to Ruby 1.9.1

I have been converting (on my development system, not in production yet) my Rails applications to work with Ruby 1.9.1. I converted my non-Rails stuff (that I care about) to work with 1.9.x a while ago.

I still use ferret for single process (or single thread) web applications. I have wanted to switch to Sphinx and UltraSphinx for a while and since ferret is not compatible with Ruby 1.9.x because of changes for unicode (RString struct, specifically) I did that conversion late last night. I was pleasantly surprised how simple it was to switch to Sphinx and UltraSphinx: lots of little edits, but quick and easy.

A little more frustrating: the auto_complete Rails plugin does not seem to be Ruby 1.9.x compatible in one of my Rails web apps. I am going through the plugin code, adding debug output, and looking for the problem. The problem may just be specific to my application.

Because of the performance improvements of 1.9.x and because of the long term maintenance overhead of having (eventually) both ruby 1.8.x and ruby 1.9.x applications in deployment, I am willing to spend a lot of effort on the conversion. Another issue is that I expect to have a Ruby book published early summer of 2009 and I would like all the examples to be Ruby 1.9 compatible (and some JRuby specific code).

Friday, January 30, 2009

Overcoming a psychological hurdle: switching my development system to use Ruby 1.9.1 by default instead of Ruby 1.8.6

I use bash aliases to quickly change my environment to use Ruby 1.8.x, JRuby, or Ruby 1.9.x. I am changing the default to use Ruby 1.9.1 - an important psychological hurdle :-)

Google Gears with GMail, Google Reader, and Google Docs

I would like to convert my workflow to use Gears enabled local persistence for GMail, Reader, and Docs. I used to use GMail POP3 support and GData web service APIs to backup my GMail and Docs locally. I still need to write some short Ruby scripts to access (as a test) the local sqlite databases used by Gears for GMail and Docs - just to make sure that I can use the local copies of my data. When I am sure that everything is accessible then I will stop doing my POP3 and GData based backups and just back up the sqlite databases that Gears creates and maintains.

To access the sqlite databases, you need to do a little searching: on my system these files are on
/Users/markw/Library/Caches/Firefox/Profiles/btzzru2q.default/Google Gears for Firefox
Notice the randomly generated directory name. I plan on searching for "Google Gears for Firefox" and using its path. I was able to use sqlite (version 3 required) to open the two top level ".db" files and the attachments and emails themselves are stores in nested directories; for example, on my system, I am looking at
ls -asl ~/Library/Caches/Firefox/Profiles/btzzru2q.default/Google Gears for Firefox/mail.google.com/https_443/GoogleMail\[12\]#localserver/10
and I see the HTML text for several emails and their attachments.

Before I stop using my old backup scheme I want to feel secure that I can access old emails independently of GMail. I may keep using my GData Google Docs script because I can convert all of my documents to OpenOffice.org format before downloading and archiving them.

In any case, local persistence with Gears should help Google convince more people to rely on their "office in a cloud".

Sunday, January 25, 2009

Monetizing Twitter and Facebook

I read this morning that Twitter just secured a $250m VC infusion of operating funds. Good news for Twitter management and users (my handle on Twitter is mark_l_watson) but they do need a revenue model. Facebook (my handle there is my gmail.com address mark.watson) at least runs adds.

I am not very active on either Twitter or Facebook but they are fun. As a consumer, I would not mind at all paying a low fee (like $5/year) for no-advertisement service and to keep them in business long term. As a developer I like to see open APIs with free low-volume use of the APIs and modest costs as use scales up.

The issue is how to get people to start paying for services that they have been enjoying for free. Flickr (mark_watson) got me to upgrade to a paid account when I hit the 200 photograph limit for free accounts. I use Google gmail, documents, and calendar as part of both my business work-flow and my personal life-flow but I have yet to upgrade to a paid $50/year account. I think that Google needs something less expensive for individuals who would still like to pay for some form of guaranteed quality service. (That said, I am sure that I buy enough stuff via Gmail advertisements that they are making money from my use of their services.) BTW, if you base business on third party web applications, make sure you back up locally! (Google makes this easy with their gdata web service APIs.)

Since I am writing a book on Web 3.0 I have been increasingly looking at the web as an application platform and I look forward to more services like Twitter and Facebook (but more focused on many separate market niches) that are both financially solvent long-term and with open (and inexpensive to use) APIs.

The issue of up-time and long term viability is huge for developers building services by aggregation of other services. I was writing example programs yesterday (for my new book) demonstrating clients using SPARQL to query public RDF repositories and was disappointed at how many SPARQL endpoints were "down", at least temporarily. Any Web 3.0 type applications that aggregate information and services must obviously be resilient to unavailable services, and that is just part of the challenge. I think that the key thing is to have not only a technology infrastructure but also a business infrastructure for Web 3.0 applications.

Friday, January 09, 2009

Amazon Web Services (AWS) web based console. The economy and IT.

Amazon just released a very slick AJAX based console that provides a GUI environment for managing Instances and AMIs, and performing other admin tasks. I found the existing command line AWS admin utilities to be very nice to use but I will spend more time trying out the web based console the next time that I have a task using AWS.

With the world wide economy in a long term slump it becomes even more important to get good value from IT spending. For small and medium size companies I think that using "cloud" services will be part of the "new frugality" although large scale server farms will always provide better value when economy of scale makes large support and infrastructure development teams make sense cost-wise. While many of us will favor commercial development tools I have a hard time imagining a future where open source infrastructure software does not dominate commercial products. Amazon does provide startup AMIs containing Windows Server and I am not arguing that Windows Server is going away. I just think that any production software that requires runtime license fees will face a more difficult fight for business in the future.

Another part of the "new frugality" is the use of scripting languages for the (probable) majority of projects where best runtime performance is not an issue, but development costs are an issue. I am writing a "Web 3.0" book for APress right now that uses Ruby as the main implementation language - as much as I enjoy using Java technologies, I have to say that the book would be twice as long and the examples much more difficult to implement in Java.

Monday, January 05, 2009

Very cool: Google's Picasa client is now available for OS X

Before I switched my business over to using Mac OS X, I "lived in Linux" and very much enjoyed the Linux port of Picasa. I use both Picasa and Flickr: both very good in different ways but I will favor Picasa now that there is a Mac client program. I enjoy travel, friends and family so reviewing pictures and videos is an almost daily activity. Picasa 3: highly recommended!

Friday, January 02, 2009

Amazon S3 and EC2 are awesome

A customer asked me to help set up a Rails app on EC2 today and I must say I am impressed how well Amazon supports developers using their web services. Setting up a new Amazon account, generating the required keys, starting with an operating system image that roughly matches what you need to work on (e.g., Java, Ruby, Perl, etc.) and getting up and running is basically a one hour job.

Amazon's developer services are awesome, especially because of the quality of documentation and tools. They did a very good job!

I am working on a Ruby Web 3.0 developer's book and a small part of it deals with deployment strategies. I am definitely going to add a section on EC2.