Wednesday, January 16, 2008

Cross architecture and Cross-OS binaries.


Read the section first on "OSX like file bundling" before reading this.

Bundling files in the way dictated above not only benefits users via one click, but makes cross architecture binaries possible/easier.

Lets use the above example again. "/portal.app/bin/portal". We can now enchance it a bit to make it cross architecture and OSX compatible

/portal.app/bin/portal.ppc
/portal.app/bin/portal.x86
/portal.app/bin/portal.amd64
/portal.app/bin/portal.osx
/portal.app/description.plist (used by OSX)
/portal.app/contents.x86
/portal.app/description

OSX has its own way of dictating how its bundles are, so we have to keep the description.plist for them. For linux, we can simply add other descriptions to the file which points to different binaries. It saves the end user having to select the correct binary off the CD for their architecture. Also, some users dont realise that even though they have an athlon 64, their current distribution is set to 32bit mode. This would make that selection automatic. It also could allow schools and such to deploy the program via a drag and drop operation onto hundreds of mixed linux and OSX computers in a lab, without being concerned about compatibility.

Probably the biggest argument against this is that it makes things bloaty. It is true, no doubt about it. However, on CD's it could be just used for the installer file for instance, and the seperate install files could just install the correct architectures binaries (as a bundle but without the other architectures attached to that bundle). In many cases though, such as games, the binaries tend to be relatively small, and the resources, which can be easily shared are massive . One way to keep the system bloat free, would be to provide a stripping application that could rip out the other architectures.

I think its safe for anyone to say that the ability to keep a single skype application on a memory stick, and pass it along a group of people without being concerned about who has which type of computer would be very neat. As opposed to now where multiple binaries must be placed on the stick. End users generally aren't that smart, and many don't know the difference between OSX and Linux, so making cross platform applications would ensure that they don't need to be concerned with what they are running. They would just need to know how to click an icon on a memory stick. Getting this working would be more about politics then anything else. Provided we could convince the major desktop environments to support file bundling for gui applications, this will easily work!

Plus, 1TB harddisks are already available. Anyone who honestly believes that this change will create even the smallest dent in performance, frankly is a ricer, and should stop using 5.25" floppies. Any harddisk (cheap and good) can easily handle recursing into an extra directory, and parsing a contents file. And when solid state storage goes mainstream, it will be even less concern.

If we want to go even further, someone could even code an Application bundle loader for windows, to allow cross windows, OSX and Linux binaries. Since you may need to override directory loading on Windows, it may be implausible.

No comments: