inicio mail me! sindicaci;ón

Archive for May, 2007

Virtualization Solutions for Mac

In my “Deploying via Makefile’s” entry, i mentioned i used a VM (running on my macbook) as a build environment for my web server. There are quite a few virtualization solutions for intel mac’s about, which are more or less all the same except that they vary on the following details:

  • Quality of interface
  • Bugs
  • Speed
  • Emulated hardware
  • Cool features

There were about 4 solutions i could find (not including emulators such as bochs), i.e.:

Here’s more or less what i thought of all of them:

1. Parallels Desktop

Parallels Desktop

Parallels Desktop is great. The version i tried (build 3188) was pretty cool, with the interface pretty much covering everything you’d want to change. However, i did bump into a rather nasty bug which pops up when you try to boot a SMP-enabled linux kernel – quite simply, it hangs. This sadly affected a lot of the current versions of Linux distro’s i tried.

On the bright side though, speed of virtualization was pretty fast (more or less near-native). Feature-wise, i got the feeling all the cool features (such as coherence) were geared to windows, thus leaving one out in the cold if they wanted to virtualize something else.

2. VMware Fusion

VMware Fusion

VMware Fusion didn’t disappoint. The version i tried (1.0b3) quite simply worked, with the interface covering more or less everything you’d want to change.
I didn’t encounter any bugs, not even the dreaded SMP-enabled Linux kernel bug – which was a relief! Speed of virtualization was in the same league as Parallels Desktop.

Feature-wise, i found it interesting that battery status was reported. It was also nice how you could easily specify how many CPU cores would be exposed to the VM. There was even a snapshot feature, which came in handy when i needed to revert the VM to a previous state. The killer feature though was the 3D acceleration support, which i have yet to see any other virtualization solution include.

3. VirtualBox

VirtualBox

VirtualBox came across as a clone of VMWare Workstation (or its mac equivalent, VMware Fusion). The version i tried (1.3.99-beta1) had a nice interface, though it looked a bit out of place, which i guess is due to it being cross-platform.

The only bug i encountered was that CPU usage skyrocketed when i was running Linux, which only becomes a problem if you are running your machine off the battery. Speed of virtualization was in the same league as Parallels desktop and VMware Fusion.

Feature-wise, it had a snapshot feature just like VMware Fusion’s. It could even open VMware disk images. Finally, there was also a rather interesting “Remote Display” feature which allowed you to connect to the VM via VNC. Sadly though, that was about it.

4. Q

Q

Q is a mixed bag. The version i tried (0.8.1a35) had a nice enough GUI, until of course you wanted to do something a bit different, such as select a raw disk image (the file selector didn’t let me do it).

There were a few bugs, such as when the VM crashed the GUI kept insisting it was still running (and thus didn’t want to quit). As for speed though, it more or less sucked compared to everything else. However this is likely because there was no accelerator (such as kqemu) included.

Feature-wise, networking seemed to rely on you tunnelling ports on your machine to the VM, rather than allowing you to access everything via a separate IP – which was disappointing to say the least.

To summarize…

In the end, i just decided to go with VMware Fusion for my Linux build VM. However, considering there has been no word yet of pricing, i am half-tempted to switch over and use VirtualBox instead, or else if that fails, Parallels Desktop.

At the bottom of my list is Q, on account of the networking configuration is difficult compared to everything else, and the virtualization is not near-native in speed. Hopefully future versions will resolve these issues, in which case i would be more inclined to use it.

I did find it a bit disappointing that VMware fusion is the only solution that supports 3D acceleration. I would have thought that given the abundance of open source 3D drivers, someone would have at least been able to implement some really basic emulation of a widely-supported 3D graphics card.

In any case, i hope that more interesting features start to arise in Virtualization Solutions in the future. Emulating a basic set of hardware devices and providing a little frontend for it all surely is getting a bit boring now, right?

rm -rf

A short while ago, i was having problems uploading files in wordpress. It seems that it was trying to write to /tmp, even though in my php configuration the clearly specifies the upload directory to be something completely different.

During the process of basically trying to solve this issue, i decided to have a little spring clean and remove some unneccesary redundant folders from my web server directory, which is when i typed in the following:

rm -rf htdocs

Safe to say, i wasn’t very pleased with the results. Not to mention, i haven’t done any recent backup’s, so my lovely customized version of wordpress more or less vanished in an instant.

The good news however is that i managed to more or less get everything working again. I even took the time to upgrade to the latest version of wordpress (which even included the sidebar widget functionality, which left me with one less thing to install).

So i guess the motto of this story is: BACKUP! BACKUP! BACKUP!

Until next time…

Deploying via Makefile’s

A few weeks ago, i attended a rather interesting Apache Security course in Birmingham taught by Gary Vaughan and some guy called Frank (whose last name escapes me). One of the key things i learned was that it was a good idea to compile packages straight from the source-code - that way it would be pretty easy to keep up to date with the latest security updates. It’d also be easy to cut out useless functionality (otherwise known as bloat).

And thus, i decided to think of a good way of automating the build + deploy process for a typical LAMP (Linux, Apache, MySQL, PHP) stack, so i’d essentially be able to quickly upgrade and tweak anything installed on my server, rather than typing everything in again and again.

After a short while of contemplating what to build the solution off, i decided to go with a combination of makefile’s and shell scripts. I also figured it would be a good idea to put the system on a virtual machine, so i could best reflect the environment of my server.

Read the rest of this entry »

The JavaScript Bandwagon

A few month’s ago, i decided to hop on the Javascript bandwagon. I wanted to find out what it could do, how well it could do it, and what limitations i would bump into.

What i discovered was not what i expected.

Incompatibility

First and foremost, one of the first problems one bump’s into with javascript is that all the major web browsers implement it differently. Code can work perfectly in one browser and fail miserably in another. For example:


var myList = {
tea: 1,
coffee: 2,
};

Seems perfectly fine to me. In fact, it worked fine in Firefox. However, it didn’t work in Safari, Apple’s flagship browser. The only clue in the JavaScript console i got was “SyntaxError - parse error”, which eventually led me to this solution:


var myList = {
tea: 1,
coffee: 2
};

Yes that’s right… all that fuss was over a single little comma.

Simple? Not!

After figuring that Javascript was a pretty simple c-style programming language, i thought i had it all figured out.

However, after checking out Dogulas Crockford’s presentation “The JavaScript Programming Language“, i was left a bit dumbfounded. What i thought was a simple boring run-of-the-mill scripting language was in fact a pretty extensible and interesting programming language. Neat!

Frameworks

The first time i tried writing something in JavaScript, i decided to go “all-pro” and not use any of the numerous development frameworks that have popped up over the years. This was a big mistake.

After a long period of writing everything from scratch (whilst only half knowing what on earth i was doing i might add), i stumbled across the mootools framework.

Selecting elements? simple. Handling events? simple. Making complex object-oriented front-end’s? simple. Having it all work in every major web browser? priceless. In fact, pretty much everything was ten times easier to work with, and solutions took less than half the time to be implemented.

Slow, yet fast, yet slow

Sadly, since JavaScript does not have a single implementation, performance varies a lot between browsers. For simple things, the difference was hardly noticeable. For more complex things though (e.g. interfacing with the WhatWG canvas), differences definitely became much more noticeable, although i would not like to speculate which browser has the fastest implementation of JavaScript as i have not done any conclusive benchmarks yet.

Single Threaded

Sadly for the most part, there is no support for threading in JavaScript. You can only do one thing at once. Whilst this is not a bad idea, it does become a little bit of a problem if you are running multiple time-out’s and intervals. Everything has to wait for its turn in line so to speak, which is pretty much bad news if you really want something to happen in X amount of time, irrespective of whatever else happens in-between…

…oh well, i guess i can live with it.

Safe to say, i’ll be experimenting a bit more with JavaScript in the future.

Close
Powered by ShareThis