Saturday, 27 June 2009

Cloud Computing

Cloud computing is all about running a service or a server using a pool of computers. The computers could be your own or you could lease time on a commercial cloud.

Who's Who


Some of the big names in this space are Amazon, Google, GoGrid and ElasticHosts. Apart from Google, they allow you to run a complete operating system and whatever other software you like on their infrastructure - which is why it is called Infrastructure as a Service (IaaS). Google's is a bit different, it is a Platform as a Service (PaaS). Google also offers applications like Google Docs (word processor, spreadsheet, etc.) which is known as Software as a Service (SaaS).

Infrastructure as a Service

Infrastructure as a Service interests me at the moment. It promises to disrupt current practice. No longer does a company need to buy servers for their business. They can lease time from one or more providers without having to outlay any capital. Nor do they need to maintain or upgrade any hardware.

How does it work?


An example may help.
Your IT department wants to upgrade one third of your servers. A normal request that you might get each year. Instead of investing in new machines they suggest that the company leases time on ElasticHosts (EH) server cloud and on Amazon's AC2 as a backup site.

The IT people would setup accounts, request a certain number of virtual servers and copy the disks of the current servers to EH and AC2. Each virtual server would be configured to have the necessary number of CPUs, RAM and network bandwidth. The IT department would then administer the servers from your offices just as if they are real servers: They can start them, pause them and stop them just like a real server.

But, they can also upgrade them in an instant. And, they tell you, it costs 25c per hour for 1GHz CPU, 1GB RAM, 1000GB disk and 100GB network traffic - $180/month. But they say that at night they can turn half the servers off so it would cost about $120/month on average. They can do the same on weekends and on public holidays too.

And if the company had a busy period, they could order more servers or upgrade the existing ones almost instantly and afterwards they would downgrade them.
Private Clouds

It sounds like magic. But these clouds can also be established using your existing infrastructure and if you need additional capacity you can lease it by the hour.

Making a Virtual Server


I wondered how hard it might be to make a disk image to run on a cloud. It turns out to be rather easy.

I have a Ubuntu linux virtual machine running in VMWare Fusion. It allows me to run linux on my Mac and it works well (I should mention Sun's VirtualBox here as well which does the same job and is free and Open Source).

Ubuntu provide a program to make the creation of virtual machines an amost trivial task.

sudo ubuntu-vm-builder kvm jaunty

'sudo' allows the program to run as an administrator.
'kvm' specifies that I want a virtual machine that will run on a kvm based cloud such as ElasticHosts. I could have used EC2 to make an image that would run on Amazon's EC2.
'jaunty' specifies the version of Ubuntu server that I wanted it to be.


(I used some additional command line options that are not needed.)

A little while later, I had a directory containing a disk image and the command necessary to run it. With some other configuration changes it it possible to create a VM in a few minutes.

Since my Ubuntu machine is itself a virtual machine running on a Mac I did not think that I could test the new VM. But I thought that I would try to run it to see what it might do. It began by complaining that it could find KVM support and then ran the VM in an emulator (QEMU).

The machine booted like a real PC and eventually gave me a login prompt.


Appliances


Some companies are now offering their applications or operating systems as a VM to download - ready to go. VMWare has a large selection of pre-build VMs.

The Future


It looks interesting. Some other work in this area focuses on standardising the management interface for a cloud of VMs, standardising the VMs so that any VM can run on and public or private cloud and schedulers so that an administrator can prioritise VMs and schedule the start-up and shutdown of any VM. Read more about OpenNebula and Haizea.

Sunday, 21 June 2009

Browser Benchmarks - too many variables

Mozilla Firefox IconFile:Apple Safari.pngFile:GoogleChromeLogo.png
Laptop Battery Benchmark

Slashdot has a link to an article which presents a claim by AMD that the MobileMark 2007 battery benchmarking specification does not represent typical laptop use - if fact, AMD claims that the test basically runs the laptop at idle with the screen dimmed and with wifi turned off.

I know I don't get anything near what Apple claimed for my MacBook Pro 2008 - and I run with a dimmed screen, Bluetooth off and with the under-volted processor tweaked down to 600MHz on idle. My laptop typically runs between 15 and 20 degrees C above ambient. For example it is 18 degrees inside and the CPU is running at 34 degrees C.

Whether the claims are true or not, I wonder how the current browser benchmark tests relate to typical use? Is there such a thing as typical use? And how does a laptop or desktop energy settings affect the result?

Browser Benchmark Tests

There are a number of browser JavaScript benchmark tests online: V8, Sun Spider and Dromaeo. Dromaeo takes too long to run so I have only used V8 and Sun Spider.

V8 benchmark is setup by Google. There are curently 4 versions of the test and it is a very quick test. Sun Spider is built for testing WebKit. WebKit is a branch of KHTML which Konqueror was built from. Apple bases Safari on WebKit. Dromaeo is built by Mozilla.

I like to experiment. I use Shiretoko (Firefox beta) for Mac mostly. I also have Firefox 3, Safari 4, and a suite of development or experimental browsers: WebKit, Stainless, Chrome and Chromium. All but Firefox are based on WebKit but Google has their own V8 JavaScript engine. I have most of these running on an old PowerBook as well.

I've been interested in how their JavaScript engines are performing so I occasionally download the latest nightly-build and run a quick test. It occurred to me that the results are affected by what else the laptop is doing and how the operating system has throttled the CPU. So I started to fix my CPU speed and shutdown most applications before I ran the tests. But in the background all sorts of updating and backup utilities are running and if they decided to start-up, the performance test results would be poorer.

I have not read about anyone else fixing their CPU speed before running the test. Perhaps it is not important, perhaps the CPU and throttling techniques know not to adjust CPU frequencies while benchmark tests are running, but somehow I doubt it.

I think we need benchmark tests that ignore other tasks, garbage collection and somehow ensure that CPU frequency and caching does not affect the result - ideally, every time the test is run, the result should be the same. Otherwise there are too many uncontrolled variables that prevent any useful comparison.

How about we put some scientific method back into Computer Science and Software Engineering?

My Results


For those that are interested, here are my rounded results and some graphs to visualize the data. With the lack of accuracy in the measurements, I suggest that a 20% error is as good as any other.

You can see that for me, Firefox is not performing as well on the tests as the other browsers. This doesn't mean that Firefox is not useable - I use it more than the others combined. It does mean that Mozilla can do better. All the WebKit based browsers do well. They are more than 10x faster than Firefox 3 on the v8 tests and take 1/5th the time on the Sun Spider tests.

The dual core MacBook Pro 2.4GHz is about 10x faster than the PowerBook G4 1.67GHz. This is probably due to the work being done in optimizing the JavaScript compilers for the Intel instruction set - it seems that the PowerPC is not a high priority.

All browsers (except Chrome) run well on the PowerBook which is our main machine.


Postscript

On reflection, if we are to be more scientific then we should have some predictions as well.

Perhaps we can predict the optimum performance of an algorithm or test case running on a particular CPU. We would then have a target for our JavaScript compilers to aspire to. Of course we need to take language overheads, if any, into account.

Friday, 12 June 2009

Google Wave: Killer App

I read an article a few days ago. It said: blah blah Google Wave blah ...

'What is Google Wave' I thought.
I watched this video and noted my thoughts which I edited later:
Different.
OK, nice.
Hmmm. Slick email. Bit scary (the idea of having the message on a server)

OK. I see, it is email and instant messaging (IM).
No wait. It is email, IM and blogging.... and blog feedback as well...

Hang on, it is now a document editor... but others can edit at the same time... and they can discuss points in the document... and its got version control...

Wow! a context spell checker too.
OK, you can publish docs and update them later.

With some sort of meeting acceptance thingy.
And it has multi-party games.

Spreadsheets and other content in the future.

I'm not surprised now when they add maps and video.

Why forms?
Nice, it can link to other social networking services.

Where are the ads?

I wonder what back-end XML database server they are using?

Stunning! Dynamic translation! They just got the whole world interested.
Ray Ozzie from Microsoft even had some things to say (which I re-state):

Ray starts out by praising 'those' that took it on.. it's nice. I don't think Ray used the Google word at all.

He thinks it is anti-web: that complexity is the enemy of the web. If something is complex - many roles, interconnections - then you need Open Source to have many instance since no one will be able to do an independent implementation.

Fundamental to the web is decomposing things to be simple so you don't need Open Source.

Ray says that the web is about open protocols, open data formats, no opaque packages and payloads being tunnelled. It is simple and out-there.

Later he says that Google Wave and Microsoft Groove are basically the same thing. That Mesh is based on Groove and that Mesh will not do all the things that Wave does or that Groove does but it will be sustainable.

Ray Ozzie built Lotus Notes. In its early days, it was beautifully simple. I liked it and I still do. Notes was way ahead of it's time. It was ahead of the web. It was strongly security minded, client-server based and Notes supported every relevant open standard that came along. At work we built an Operations Support System (1995 and onwards) with it and it is still supporting the job and fault management systems today.

Notes was great. Ray and his team did a great job. I think Google wave is what Ray would have liked Notes/Domino to be today.

Notes had a back-end database that seems to be like XML in structure and separated the presentation from the data. Wave has the advantage of virtually real-time synchronisation where as Notes, due to bandwidth limitations, was 'document' based and asynchronous. This is why Notes had to deal with replication conflicts - something they worked-around nicely - but Google it would appear doesn't have a problem since it is synchronising at a very low level.

Wave seems to have the following attributes:
  • Hierarchical database in XML.
  • Fine-grained time stamps.
  • Nothing deleted (partially solves replication conflicts and allows playback).
  • Remove edit history by publishing. Publiched docs retain links to source Wave and it has its own edit/update history.
  • Version control within document (allows playback).
  • Allows extensions (an XML data structure instead of a Blip - the content part of a Wave).
  • Each Wavelet has an Access Control List (ACL) of people and robots that can read the Blips within it.
  • I suspect that the Blips are signed with the author's private key and that other people in the ACL can read the Blip with the author's public key.
  • For security, during transmission, each fraction of a Blip would/could be encrypted with the reader's public key and decrypted with their private key - using TLS or SSL.
  • I think it would be possible to have no ACL so that the document would become a public document, but I would hope that Wave uses a white-list.
  • It seems that a reader is also an editor - no distinction. It may be simple enough the have reader and editor roles.
  • The GUI takes the Wave and formats it for display.
  • Spelling and translation seem to be in the GUI.
  • The Back-end manages replication and updates.
  • The scope of conflicts are eliminated by date-stamped single-character transactions and no actual deletes.
  • Front-end extensions can display other content.

I am wondering.

Has Google hit upon a partial solution for internationalisation (I18N)? Can a Wave, web and native applications use the Google translation service for window titles, menu items and help pages to eliminate bundling languages with an application?

Has Google enabled global collaboration of source code where, say, English comments and strings are translated into Chinese based on the browser user agent language setting?

Is Google Wave to beginning of the end of SPAM?

Monday, 25 May 2009

How to make memorable but secure passwords

Some people, perhaps most, have a system for making passwords. Some systems
involve the use of the same password everywhere - easy to remember but if
discovered their online life is easily accessed. Others have different
passwords and write them down.

My system is to maintain long, virtually unique passwords which I never need
to commit them to paper or electronic note.

My goals are:

* at least 8 characters
* the use uppercase, lowercase, digits and symbols/punctuation
* the discovery of the system should not compromise my passwords
* no need to record any password
* be able to quickly work-out my password for any site

The System

* Make up a memorable code with preferably uppercase, lowercase, numbers and
symbols/punctuation.
* For each site, consistently use some aspect of the site such as 3 or 4
letters/numbers of the site URL - modified in some systematic way - and add
it to your memorable code. Add it using any rule you like.

There is a problem with this system: sometimes sites change their name
which, for me, has happened once. In this case I have not needed to change
my password but since most sites will send your password to you, should you
forget, you can easily have your old password recovered and then you can
change your password - it doesn't happen often.

Examples

Assume your memorable code is Ab19#z.

Example 1: Use the first, second, second-last and last characters of the
site, added in reverse order, first and last capitalized, insert after the
4th character of your memorable code.

So a password for google.com would be Ab19EloG#z.

And for ibm.com it could be Ab19MbbI#z. (You should have some way to handle
site names that 'fail' your system or require longer passwords than that of
your system).

Example 2: Insert the memorable code into the first and last characters of
the site name.

So the password for google.com would be gAb19#ze.

It goes without saying (hopefully) that you should make up your own system
and you should probably not use my examples.

Ideas

* Consider using the organisation type or country code.
* Consider using multiple systems. One for important sites and a simpler
system for ad-hoc, single-use and other sites not containing personal data
* Consider a version of the system for your home PC accounts

Your should assume that your system could be discoverable, so you need to
choose a memorable code that is secure by itself.

If you want to document your system, do so with care. You should not write
it down verbatim - try to obscure it ;-)

Saturday, 23 May 2009

So, you don't use open source software because it is not well supported?

But what support do you get from software you pay for?

Lets start with Vista support.

If your Vista install has a bug or doesn't run some of your purchased applications or crashes, how will Microsoft help?

Their End User License Agreement (EULA) for Vista has the following:

(If you are interested, here is a simple commentary on Windows XP Home)

Length of Warranty: Basically 1 year as I read it.
B. TERM OF WARRANTY; WARRANTY RECIPIENT; LENGTH OF ANY IMPLIED WARRANTIES.
The limited warranty covers the software for one year after acquired by the first user. If you receive supplements, updates, or replacement software during that year, they will be covered for the remainder of the warranty or 30 days, whichever is longer.
Repair: Microsoft will repair or replace it or give you a refund.
D. REMEDY FOR BREACH OF WARRANTY. Microsoft will repair or replace the software at no charge. If Microsoft cannot repair or replace it, Microsoft will refund the amount shown on your receipt for the software. It will also repair or replace supplements, updates and replacement software at no charge. If Microsoft cannot repair or replace them, it will refund the amount you paid for them, if any. You must uninstall the software and return any media and other associated materials to Microsoft with proof of purchase to obtain a refund. These are your only remedies for breach of the limited warranty.
What they warrant it for: Nothing it seems. Microsoft don't warrant that Vista is fit for any task.
G. NO OTHER WARRANTIES. The limited warranty is the only direct warranty from Microsoft. Microsoft gives no other express warranties, guarantees or conditions. Where allowed by your local laws, Microsoft excludes implied warranties of merchantability, fitness for a particular purpose and non-infringement.
So... I hope you kept your receipt showing the amount you paid for Vista, otherwise will not get any refund, nor will Microsoft need to fix anything since you have no proof of purchase.

But you actually use more open source software than you think

Web sites

According to NetCraft, about 70% of the million busiest web sites/servers run open source software - Apache Web Server. Of all active web sites the figure is about 50%.

Google and Yahoo use mostly Open Source software to develop and run their services.

Operating Systems

If you run Linux then your Operating System is Open Source.
If you own an Apple Mac then your Operating System is Open Source.
Many companies and web service providers run Solaris. Solaris is now Open Source.

Mobile Phones

If you have a Nokia Symbian mobile phone - your phone's OS is Open Source.
If you have an iPhone, the OS is Open Source.
If you have an Android mobile phone, the OS is Open Source.

In fact, your mobile phone service provider is probably running equipment based on the ATCA standardized hardware platform running Carrier grade Linux (CGL) and other Open Source software.

For more information, see the IEEE SCOPE site.

Web Browsers

Firefox, Safari, Chrome and Webkit are Open Source web browsers.

Routers

Some ADSL routers use linux. eg. Netgear, Linksys, Huawei. Linux is Open Source.

Last but not least...

Almost every PC, mobile phone or PDA runs some version of Java. That is estimated to be installed on 5.4 Billion devices. Most of Java is Open Source.

So what do you have to worry about?

The universe runs on Open Source - Your work probably uses it - You already use it, so why not try it out on your current PC, or for that next work project or when you buy your next PC or laptop?

... and you will probably get more support than you do right now.

Real Support

The following companies and organisations develop, support or have donated commercial products as Open Source:
Google
Cisco/Linksys
Apple
IBM
Nokia
Yahoo
Sun (now Oracle)
Sony
Red Hat
Pixar
JBoss
Dell
LG
Samsung
Novell
Mozilla
HP
Intel
NVidia
HTC
Motorola
Texas Instruments
EMC (VMWare)
Microsoft - yes, they are helping as well!
Most (all?) universities
Perhaps it would be easier to list companies not supporting Open Source software.
Want more Open Source software?

Try here.

Some links to quality and popular Open Source software


What application do you want?

Anti virus? Try ClamAV for unix/linux or ClamXAV for Mac OS-X or ClamWin for Windows.

Word processor, Spreadsheet, Presentation etc.? Try OpenOffice

Web browser? Try Firefox, Webkit, Chrome (from Google), Safari (from apple - based on WebKit), Stainless

Mozilla Firefox runs on Windows, Mac OS-X, and Linux PCs
Webkit runs runs on (Windows and Mac OS-X PCs. Safari probably a better version for most people.
Google Chrome runs on just Windows for now. You can get an beta Mac OS-X version here.
Apple Safari runs on Windows and Mac OS-X PCs
Stainless (closed source?) runs on Mac OS-X. It is tiny, very fast and very simple. I added this because it is an interesting project.


Graphics editor? Try the GIMP

Media player? Try VLC

Bit Torrent client? Try Transmission (open source).

Sound editor? Try Audacity

Email client? Try Mozilla Thunderbird.

Virtual PC environment? Try Virtual Box

This allows you to run other operating systems (guests) on your current OS (host). For example you might like to run Linux on your Windows PC. Linux would run in a window or full-screen if you like and at the same time you can run all your other Windows applications.

Virtual Box allows you to easily install multiple copies of Linux and even other Windows versions on your current Windows PC. It also works on your Mac so you can run Windows and Linux on your Mac - this is what I do. You can start them up and shut them down just like real PCs.

Friday, 15 May 2009

Sending email to multiple recipients - a better way

Current Practice

Generally when people send email they list the recipients in the TO field. This means that each recipient gets a copy of the email and a list of all the other recipients.

Nothing wrong with this but if this email is forwarded, generally a copy of all the other email address is forwarded as well. Now if the email message is really interesting it may be forwarded with increasing lists of email addresses to people who may not know who any of the other email addresses are.

In a perfect world this may be fine, but should this email with lots of email addresses fall into the wrong hands it could end up on SPAM lists or worse: someone could use the chain of email addresses to establish relationships between people in order to launch a more believable attack.

For example if A sends an email to B, C and D then a SPAMer could send SPAM to B, C and D and make it appear that the email came from A (and vice-versa). Since B, C and D already know A the email may get passed their SPAM filters and opened - The SPAMer is now only one click away from launching an attack on their computer.

A Better Practice

Instead of using the TO field, simply use the BCC field and never use the TO or CC fields.

How Does This Help?


Addresses in the BCC field all get a copy of the email but they do not get the list of other people's email address - they only see their own email address.

Should they forward the email on, they only forward on their own email address.

If people begin to adopt this practice, there will be fewer email addresses falling into the hands of the SPAMers.

Sunday, 3 May 2009

Another Warrimoo Power Station Online



Our solar photovoltaic system was connected to the grid via feed-in meter last week.

Initially I was told that they would need to replace my existing 3 phase meters with a single poly-phase meter. But all the contractor did was install another meter.

Integral Energy, the regional electricity provider, installs the feed-in meter in a gross-feed-in configuration. This means that the feed-in meter counts all the energy that we generate and not just the excess energy at any point in time. So if feed-in rates are increased we will be credited for all the energy we produce.

Presently the feed-in rate is roughly the same as the usage rate: 14.62 c/kWh (excl. GST).

http://www.integral.com.au/wps/wcm/connect/8377a4804925a5499a279ff738d2752c/Sunpower+Interconnection+Agreement.pdf

http://www.integral.com.au/wps/wcm/connect/integralenergy/NSW/NSW+Homepage/forHomesNav/Sunpower/

Saturday, 2 May 2009

Online Documentation Conversion Services


I needed to convert a MS Publisher document into a PDF recently. I stumbled upon this site:

FreePDFConvert

It seemed to do a reasonable job.

A friend gave me two other sites that might be useful as well:

DocMorph

Media-Convert

Thursday, 30 April 2009

Costly Enterprise Junk Mail

While I was reading a weekly staff news letter I thought: what is the productivity lost if all staff actually read this and all the other news letters and corporate emails each year?

I did the calculation: 13000 staff; 3300 words worth reading per week; 200 words per minute; 8 hours a day; and an average pay of $AU250/day.

If all staff read the corporate junk mail, it would costs $AU5.4M each year!

But not everyone reads them and some just skim them. So if only 50% were actually read, and if only half of those were completely read on average then it adds up to $AU1.4M — still a large number.

I also read from one source that the average reader only comprehends 60% of what they read. So why do we bother if only 15% of the information is getting through?

So, tell management to keep it small and publish less often.

But we all send vast quantities of emails and we craft huge project plans and reports and strategies and requirements specifications and business cases and ... so keep it short for all our sakes.

Was that too long?