Tuesday, November 24, 2009

Green programming

In my tradition of nabbing useful comments - largely as a diary. I've got one from "TheRegister". The original question is why do we need a full copy of Windows in every VMWare virtualization session, ie can't we just share the OS code because 40% of the server is being used up in dealing with this bloat. Well all the obvious answers were there; by using Solaris Zones or FreeBSD Jail then you can but then you don't have Windows. It goes back to the code bloat theme and someone called Captain Thyratron et al  summed it up in a rant:



"Solaris Zones/Containers are pretty good (speaking as a self confessed Solaris fan). Though last time I looked they didn't support migration of a live VM from one machine to another. So pluses/minuses both ways.
Of course, the best thing is to have a self-clustering app that doesn't need something like VMWare to give it resiliance, etc. et. You could run such an app natively on a series of hosts in their nice multitasking operating systems. Now where would I get one of those...
I'm pretty sure that virtualisation is just an excuse for lazy developers to not think about their app design properly. I see developers at my employer doing all sorts of crazy things - e.g. a whole Windows VM just to serve up a 10 page website! Whatever happened to efficiency?
Dear Reg, please can you start a Campaign for Real Computing. Once upon a time programmers were skilled at developing efficient code that ran quick in small amounts of RAM. Now that resources are 'plentiful' the programming community has generally got lazy:
1. VMs where a native app would do.
2. Languages with bloated runtime environments that take forever to load just so you don't have to worry about errant pointers.
3. Apps running as crappy interpreted code in junk scripting languages in browsers just to save the effort of compiling the bloody thing.
4. New thin client technologies that consume vast amounts of bandwidth and give poor results instead of updating perfectly good things like X11.
5. An ever expanding array of app hosting environments (Silverlight, AIR, etc.) that are all 'indispensible' that make machines slow to boot and don't do anything that a carefully written native app couldn't do.
6. Data stored in man readable text when computers learnt to store things as binary a long time ago (come on, who EVER reads XML as the prime means of accessing the data within?).
I wonder how long it will be before data centre managers realise that lazy developers and vendors are costing them huge amounts in electricity, hardware and bandwidth costs?"
So there you have it - and it's true. Bloaty programming has a hardware and energy consumption cost. Ending code bloat is green. Do we really need items 1 to 6? I don't think so. This is why I'm anti code bloat and why someone telling me that throwing hardware at it is cheaper than doing the app right in the first place is plain crazy. It may be cheaper (debatable) but it's wasteful and short sighted.

Sphere: Related Content

No comments:

Post a Comment