James Gardner


Oracle DB XML (was Sleepycat)

Posted in Software Releases, Talks and Conferences, Debian, XML by thejimmyg on the February 12th, 2008

At Geek Night 5 I bumped into an old friend of mine John Snelson who I haven’t seen for ages. He’s now working for Oracle on DB XML, a project he’s been involved with for a long time since the Sleepycat days. I promised to have a play with the Python bindings so for anyone following in my footsteps, here’s how you do it, it’s a lot easier than it appears from the docs and forum posts…

Download the latest version from the link below by clicking the "Free Download" button in the top right: http://www.oracle.com/technology/products/berkeley-db/xml/index.html

The dbxml-2.3.10.tar.gz file is about 30.9Mb. You’ll also need a standard GNU toolchain, I happen to have the following installed although you may not need them all:

sudo apt-get install build-essential make libc6-dev gcc g++ patch zlib1g-dev libncurses5-dev libssl-dev flex bison sharutils subversion python gettext autoconf2.13 pkg-config

Next extract the source and build it:

tar zxfv dbxml-2.3.10.tar.gz
cd dbxml-2.3.10
sh buildall.sh

This takes quite a while (about an hour on my Thinkpad R50e laptop) but compiles without any problems producing an install directory with bin, docs, lib and include directories containing everything you need.

Now for the Python bindings which are equally as easy because the main distribution also comes with a compatible source tree for the Python bsddb library. Compile and install it all like this:

cd dbxml/src/python
python setup.py build
python setup.py install
cd bsddb3-4.5.0
python setup.dbxml.py build
python setup.dbxml.py install

If you were to have any problems the README files contain plenty of tips. To test the Python bindings you simply need to add the library directory to your LD_LIBRARY_PATH since the original buildall.sh script is polite enough not to actually install the files to the system locations (although there is an option to have it do this). In my case this meant:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/james/Desktop/dbxml-2.3.10/install/lib

Now you can test the example:

cd ../../../../examples/python
python examples.py test

Everything should work perfectly.

Now that I’ve got the software compiled I need to start using it ;-). Here were some links I found were a useful introduction to native XML databases but the links on the Oracle page linked to earlier are no doubt worth a read too.

http://www-128.ibm.com/developerworks/xml/library/x-mxd4.html http://www.rpbourret.com/xml/XMLAndDatabases.htm http://www.w3.org/TR/xquery-use-cases/ http://www.regdeveloper.co.uk/2007/07/18/berkeley_db_xml/

Flex Builder Linux Alpha 2 on Debian Etch

Posted in Web, Software Releases, Desktop Software, Talks and Conferences, JavaScript by thejimmyg on the January 25th, 2008

I went to the Flex User Group http://ria.meetup.com/7/calendar/6862191/?a=wm1_rsvp yesterday because AIR is one of the technologies I’m most excited about at the moment. I was slightly surprised by the demographic, I think I was expecting a crowd of open source developers, much like you’d find at a hack day or geek event but somehow they didn’t seem as excited about the technologies Adobe are beginning to open up as I did. I wonder whether this is because most of the people who use Adobe products are less technical than the average person you might see at other events and therefore less interested in the new coding opportunities Flex and Air bring.

I got the slight impression that some people were just there for the free beer provided by Adobe (although maybe that’s just because I was sitting near the back by the bar) and others (including myself probably) had a feeling of "why should I do Adobe the favour of switching to flex". I think Adobe’s answer might be along the lines of "we’re doing enoughm just look at the numbers and if you don’t want to take advantage of it that’s up to you" so some of the questions seemed slightly hostile, but maybe I’m reading too much into it and applying my views to my impression of everyone else’s!

I was also slightly surprised by some of the attitudes of the speakers who made frequent references to a designer/developer divide saying things like "you’ll only be impressed with that if you are a developer". Maybe the audience for Adobe products does feature this divide but it surprised me nonetheless and I was surprised it was something the speakers wanted to encourage.

Anyway, despite the above observations I did find the event very interesting and am pleased Adobe are moving towards being more open. One question I asked in the Q&A section was "What are the timescales for AIR on Linux". The answer I got back was "soon" and it appears James Ward is as keen to get AIR on Linux as I am as it is his primary desktop too. Still, I pointed out that if Adobe wants to attract open source developers a Linux port would be pretty essential. Let’s hope it happens "soon" as James promised because developing AIR on FlexBuilder on VMWare is very painful! James also suggested I try the Flex Builder Alpha for Linux so here goes…

First install Java. To do this you’ll need to edit your apt sources list to use the non-free repository:

sudo vim /etc/apt/sources.list

Mine looks like this:

deb http://ftp.uk.debian.org/debian/ etch main non-free
deb-src http://ftp.uk.debian.org/debian/ etch main non-free

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

Next install Java 5:

sudo apt-get update
sudo apt-get install sun-java5-jdk

(You can probably get away with the JRE if you prefer, in which case install sun-java5-jre instead).

You’ll have to agree to the license:

Package configuration

 ┌───────────────────────┤ Configuring sun-java5-bin ├───────────────────────┐
 │                                                                           │
 │ Operating System Distributor License for Java v1.1 (DLJ)                  ↑
 │                                                                           ▮
 │ Operating System Distributor License for Java version 1.1 (DLJ)           ▒
 │                                                                           ▒
 │ SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE JAVA PLATFORM    ▒
 │ STANDARD EDITION DEVELOPER KIT ("JDK" - THE "SOFTWARE") TO YOU ONLY UPON  ▒
 │ THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE  ▒
 │ AGREEMENT (THE "AGREEMENT").  PLEASE READ THE AGREEMENT CAREFULLY.  BY    ▒
 │ INSTALLING, USING, OR DISTRIBUTING THIS SOFTWARE, YOU ACCEPT ALL OF THE   ▒
 │ TERMS OF THE AGREEMENT.                                                   ▒
 │                                                                           ▒
 │ 1.  DEFINITIONS. "Software" means the code identified above in binary     ▒
 │     form, any other machine readable materials including, but not         ▒
 │     limited to, libraries, source files, header files, and data files),   ↓
 │
 │                                  <Ok>
 │                                                                           │
 └───────────────────────────────────────────────────────────────────────────┘

Test Java is working by typing java -version at the command line. You should see something like this:

$ java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)

Next you’ll need Eclipse 3.3 or higher. Go to http://www.eclipse.org and download the Linux version (I chose Eclipse IDE for Java EE Developers). Extract the files and launch the program:

tar zxfv eclipse-jee-europa-fall2-linux-gtk.tar.gz
cd eclipse
./eclipse

You’ll be asked where you want to create a workspace. I stuck with the default of /home/james/workspace. Eventually Eclipse loads. Once you are happy it is working you should exit it and you can finally you can get around to actually installing Flex Builder.

Download the alpha 2 from the Adobe website: http://labs.adobe.com/downloads/flexbuilder_linux.html then run these commands:

chmod 755 flexbuilder_linux_install_a2_121807.bin
./flexbuilder_linux_install_a2_121807.bin

You’ll see the following output:

Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

Then the installer launches and after a few screens you are asked to choose your eclipse folder. This will be the location of the eclipse folder you just extracted. You’ll also be asked to install Flash Player 9 and you should choose to do so, even if you already have it because this version has debugging built-in.

The installation finishes with some errors which aren’t displayed. Instead you are asked to view the installation log but not told where this is and I couldn’t find it! The installer doesn’t tell you how to launch Flex Builder either, but it turns out you just load Eclipse again and Choose Help->Flex Builder whereupon you are asked to enter a license key and told you only have 65 days remaining. After all that effort it would have been nice to know this was only a 65 day trial if it really is. After clicking OK nothing happened (didn’t seem to be able to connect to flexstart.adobe.com) so I exited and tried again.

To get started you need to create a new project. Chose Project… from the File menu and choose a Flex Builder project. There is no support for AIR or BlazeDS so you can only create Flex applications targeting Flash Player 9 but this seems like a good start.

Here’s a screenshot:

http://jimmyg.org/wp-content/uploads/2008/01/flex_builder_running.png

So I think we can add Debian Etch to the list of platforms where Flex Builder works. Good work Adobe and keep it up!

P.S. Was that Evan Davis I spotted at the event? P.P.S Submit bugs!

gOS 2.0 Rocket Review

Posted in Web, Software Releases, Desktop Software by thejimmyg on the January 9th, 2008

gOS Rocket is the second release of Good OS LLC’s operating system nicknamed the Google OS because rather than relying on traditional desktop applications, gOS is set up for you to work online instead and has icons launching many of Google’s applications placed directly on the desktop.

Many tech sites are making a big deal of this talking about how gOS allows the user to move their applications into the cloud, a name used for applications which run over many servers on the internet. In reality gOS is nothing more than a copy of Ubuntu with a customised enlightenment install instead of Gnome, and released under a more restrictive license than the original Ubuntu. Despite this obvious fact I can’t help but get very excited gOS myself because the fact gPCs are selling in large quantities means this OS does mark a significant shift in the way ordinary consumers of technology are thinking about what an application is.

Here’s a quick overview of the install as well as a few screenshots. I’d encourage you to download and burn it yourself if you are interested though. Installation is easy enough. You use bittorrent to download an ISO image which you burn to CD. After rebooting gOS live loads which lets you try the operating system without installing it and without it changing any settings on your computer.

As gOS boots you see a green screen with the gOS logo and a bar moving from left to right. A nice touch is that the bar moves with sinusoidal motion, slowing down as it reaches each end as if you are actually watching it side on as it moves around in a circle. You can see this release is still a bit rough around the edges though because after the previous screen disappears lots of usage messages are printed for each line of text output during the boot because some command is being used with the wrong arguments.

After a minute or two gOS finishes loading (it would be a lot quicker if you installed it rather than running from CD-ROM) and without clicking any buttons or having to sign in you arrive at the desktop:

gOS Desktop

The first thing you notice is the new application launcher at the bottom of the screen. This now resembles the Mac OS X Tiger dock even more closely with the icons growing larger as you move the mouse over them and extra applications you lauch appearing on the left of the bar. It does feel rather slick.

gOS Dock

Here I’ve got my mouse over Google news and have both Firefox and the Gimp running (their icons are on the right).

The icons on the dock are:

Firefox Web Browser
GMail
GTalk
Google Calendar
Google Docs and Spreadsheets
Google Reader
Google Maps
Google News
Google Finance
Google Product Search
gBooth
YouTube
Blogger
Facebook
Wikipedia
Meebo
Skype
Xine Movie Player
Rhythmbox Music Player
Box.net
Tech Support

The gOS-specific applications you may not have heard of are gBooth, Box.net and Tech Support. gBooth is supposed to let you use a web cam but clicking the icon gives this error page on a Plesk-hosted website which hasn’t been configured yet. So that doesn’t work at all (not too great a start):

gos-20-rocket-004.png

The Tech Support icon loads faqly.com in Firefox which you can visit from any browser and is just a simple question and answer site which isn’t too interesting.

The box.net icon is more interesting and loads this in Firefox:

gos-20-rocket-005.png

When you click register as individual you are asked to edit your credit card details but it states you will only be charged the $7.95 per month after the 14 day trial period. You have to remember to cancel your trial or you will be charged.

gos-20-rocket-006.png

Box.net is a nice service but there is no integration with the rest of the gOS desktop so there is no advantage of using it with gOS rather than on any operating system with a web browser.

One of the main features of this 2.0 version of gOS was supposed to be the inclusion of Google Gears to enable offline access to certain web applications. This isn’t actually installed for you when you load Firefox you are shown the screen below for you to install gears yourself. The other link (supposed to be a list of gears applications) just shows an untitled blank page at the moment.

gos-20-rocket-003.png

Although the gears installation routine all completes successfully and the Google Gears Settings option appears on the Tools menu, gears doesn’t actually work. I’ve tried re-installing twice so I’d consider this a bug. SInce it was supposed to be a major feature of this release it is a bit disappointing.

Until gOS actually integrates features into the desktop it will be nothing more than a slightly flaky Linux install with some links to web pages. The concept is a good one but the implementation doesn’t live up to the hype. Perhaps the most impressive thing about gOS isn’t gOS itself, but rather the fact that the free web applications it relies on have evolved to the stage where they genuinely can be used to replace desktop applications.

Despite the slightly negative comments about the beta so far I’m still going to be watching the releases with interest as gOS really does represent the future and it won’t be too many years before I am using it or something similar as my main desktop.

AuthKit 0.4.0

Posted in Pylons, Python, Software Releases, AuthKit by thejimmyg on the September 30th, 2007

I’m pleased to announce the release of AuthKit 0.4.0. It has taken me a lot longer than it should have but it is out. You can download AuthKit here. Please note that the config file format has changed a bit since 0.3 so have a look at the Pylons Book chapters to read about the new version.

Please let me know about any bugs and I’ll release a 0.4.1 if necessary.

Safari 3 Beta for Windows

Posted in Web, Software Releases, Desktop Software, Business by thejimmyg on the June 11th, 2007

Apple have announced a Safari 3 beta for Windows. The download is 8Mb and should make it easier for people like me to develop websites that work on the Mac version of Safari. I’ve already noticed the 3aims.com site doesn’t render correctly on Safari 3 so that is something I’ll look into.

What’s interesting is that the default install also includes Bonjour (Apple’s network discovery tool) and the Apple Software Update program. Does this mark a new trend of Apple is trying to launch core components on the PC?

It looks like the browser tries to use the Mac fonts but the rendering doesn’t look quite right to me.

safari.png

Update: Sadly it seems to crash every time I exit with an error “The memory cannot be read”

safari-crash.png

Pylons 0.9.5 Released

Posted in Pylons, Mako, SQLAlchemy, Software Releases by thejimmyg on the April 13th, 2007

I’m pleased to announce the release of Pylons 0.9.5. This version has seen a lot of work go into it including formal support for Mako and even better internationalization. I’ve also completely re-written the QuickWiki tutorial to bring it bang up to date with the latest features of SQLAlchemy. Ben has the full announcement here.