log4p

Peter Maas’s Weblog

Archive for May, 2007

Google Gears

With all the commotion around Appollo I forgot about another key player in the field: Google. Today they opened up the beta of Google Gears, a solution to run webapplications without the need of an internet connection. They achieve this by the means of a browser extension which is availlable for Firefox 1.5+ (OSX, Linux, Win) and IE 6+.

When accessing a gears enabled site the extension asks permission to store data locally:

Allow access

The fun part is in the fact that you can query this database using javascript using full flexed SQL:

  1. // Get the 3 most recent entries. Delete any others.
  2.     var rs = db.execute('select * from Demo order by Timestamp desc');
  3.     var index = 0;
  4.     while (rs.isValidRow()) {
  5.       if (index <3) {
  6.         recentPhrases[index] = rs.field(0);
  7.       } else {
  8.         db.execute('delete from Demo where Timestamp=?', [rs.field(1)]);
  9.       }
  10.       ++index;
  11.       rs.next();
  12.     }
  13.     rs.close();

(full source availlable here)

I really think this is what is needed for the next generation of web applications; I for instance would like to have a look a mail stored in my GMail account or items in my NetVibes homepage!

As soon as I got some time on my hands I'll give it a go, can't wait!

No comments

Diff & Named pipes in OSX?

previously I wrote about using named pipes to avoid temporary files when working from the CLI. The odd thing is that the following command seems to work on bash/linux but responds with an error message (curl: (23) Failed writing body) on bash/OSX

diff <(curl http://www.google.com) <(curl http://www.google.com?q=a)

I don't really understand why this doesn't work, but it seems that to the process the pipes differ from the default stdout where they shouldn't. To bad, it would be useful!

update

While googling arround I found a page breaking down the problem. Greg Miller discovered that the actual problem is HFS+ (the filesystem) returning the same inode number for two different files; which since it isn't inode base could be somehow correct.

Hopefully Apple will fix this in the near future, but I guess I'd better grab myself the sources and build my own version of diff.

No comments

Spring 2.0.2 / 2.0.4 / 2.0.5

About two weeks ago I migrated our project from spring 2.0.2 to the latest version available version in the maven repository at that time 2.0.4. The transition was smooth. It took a couple of days before I started realizing that the strange bugs (mostly in binding of primitives) surfacing in tested/accepted code where probably related to this version change.
I reread the changelogs for 2.0.4 and the only suspicious change seemed to be the following,

PropertyEditorRegistrySupport/BeanWrapperImpl lazily registers default editors when needed (to avoid init overhead)

But I wasn't sure, didn't have much time for a thorough investigation. This morning when we discovered even more unexplainable bugs I decided to upgrade to the latest stable version 2.0.5.

Even though there is nothing related to binding in the changelogs of 2.0.5 upgrading fixed our problem. Scary stuff! I started adding/extending a couple of unittests to be able to detect problems in the binding mechanism so I can verify their correct functioning in the future.

No comments