Wednesday, 4 November 2009

Ubuntu 9.10

The new version of Ubuntu was released on 22nd Oct, and as usual I've had a play with it on the EeeBox to see if it is a viable replacement for Windows XP (which I'm getting a bit tired of to be honest).

For the last few versions, it's been possible to install Ubuntu side by side with Windows without having to repartition your drive. It stores all its files in a special dedicated file on your windows drive but otherwise runs dual-boot with windows. When you've decided you've had enough, you just boot into Windows and uninstall the application and Ubuntu is removed. Performance is not exactly the same as running it natively, but it does let you test your hardware more realistically than with a virtual machine. On the EeePC video can very slightly jerk when the motion is too fast, but it's still watchable.

This 9.10 version seems to be even better than previous ones - and many of the small irritations I've seen appear to have been removed (trouble playing Dolby Surround AC3 through the S/PDIF port for example). As a result, I am seriously considering it as a replacement for windows for the first time. I've been through all my key applications and at the moment I can't find anything that I can't do on Ubuntu as well as on Windows XP.

I've also been playing with Windows 7 and MS have made some definite improvements. It's considerably less irritating than Vista was, and although I've not tried it personally, it will apparently run on an Atom N270 processor (EeeBox) without too much trouble. From my first impressions, I'd be happy to have a Windows 7 machine in the house where I resisted Vista completely. The problem is, it's £60+ per machine and I have four. This is why the new Ubuntu looks so attactive!

As usual the longer term issue with Ubuntu is what I do with my TVGuide application - do I rewrite it to be cross platform or not? This time I've decided to go the web route - looking at how advances in web technology might allow me to "draw" the guide without having to resort to Java or Silverlight.

My first experiments look pretty good, so I'm going to continue with them. The aim is to produce all the functionality in the existing Windows TVGuide through a web interface, allowing it not only to be cross platform, but also to be accessible from anywhere in the World. Once I get it working sufficiently well, I'll post some images to demonstrate it.

Wednesday, 30 September 2009

DVR disadvantages

It would seem unlikely that there are any disadvantages with using a Digital Video Recorder, afterall you can pause live TV, record series automatically and you don't run off the end of your "tape."

Well one problem is that you're so into your automatic recordings that you never watch any live TV. Not a problem, except that then you don't get to see adverts for any new programmes which are being shown. If a great new show starts to be broadcast, how do you know to set your PVR to record it?

This is exactly the problem we have, and as usual, I've made a modification to my TVGuide application to help us out with this.

On a daily basis, the TVGuide scans the list of programmes coming a week in advance and pops up new programme names which it has never seen before. I also can tell it only to look at particular genres so that I don't get too many items in the list.

Then I can choose never to be notified about this programme again, or click and view the details of the programme to see if I like it. If I don't I can leave it and it remains in the list until the broadcast has passed.

This has already pointed out some interesting documentaries and one new drama series that we otherwise would not have known about. Given there are quite a few programmes being broadcast every week, why not let the computer do the hard work, so that all you have to do is browse through the final list?

Tuesday, 7 July 2009

Virtualisation

Virtualisation is a cool technology. If you're not familiar with the concept, it's a way to run a complete copy of a different operating system inside a window in your existing operating system.

For example, you might want to run Linux inside Windows. In this case, Linux is called the "guest" and Windows the "host". The hard-disc that the guest writes to is laid out as a big file in the host, rather than having to allocate some space on a real hard-disc. The hardware on your host PC is exposed to the guest, allowing it to get network access, video and sound as if it were just another PC on your network.

Testing configurations

The main advantage of this technology is it lets you try out operating systems, or software on them, without affecting your existing PC. In addition, you can copy the hard-disc file and have the exact same virtual machine run on a different PC for example. Or you could back up the hard-disc file and should something go wrong with your virtual machine, just delete the bad installation and restore your backup. It's as simple as copying a file.

I use this technology all the time in my work. We have multiple virtual machines which each have a different browser version installed. We can then start each one up in turn and test some web software under multiple browsers. Similarly I can test software under different operating systems or configurations.

Finally, there's a great option of snapshots. These let you store the complete machine's state at a point in time, and then at any later point you can just revert to the snapshot you took earlier. All the changes you have made are wiped, right the way down to the disc sector level. I can install anything onto the machine, mess it up totally, and then when I'm done, just revert back to the point where it worked again.

Software virtualisation

There are two main types of virtualisation: Hardware and Software. Software virtualisation was the first, where companies wrote virtualisation applications which allowed you to run one operating system inside another. One of the first companies I was aware of that did this was VMWare. For a long time, they were the industry leaders. Microsoft then got on the bandwagon and released VirtualPC. More recently Sun bought a company and released VirtualBox.

Whilst VMWare is still a commercial product, what's particularly cool about VirtualPC and VirtualBox is that they are FREE. In addition, VirtualBox is open source too, so theoretically, that's even better.

I've used all three in the past and to be honest, any has been fine for hobbyist use. VirtualBox's support is better for different operating systems however (certainly than VirtualPC) and is being developed actively, so that's would be my recommendation.

Hardware virtualisation

Hardware virtualisation is the new direction companies are heading in. This allows you to run multiple virtual machines on a single set of hardware simultaneously, and the hardware looks after the virtualisation rather than the software on top of it. This provides better performance.

Virtualisation is advantageous when you need to run multiple legacy operating system instances on one physical (more modern) box, saving you hardware and maintenance costs.

It works because legacy applications often don't require much processing to keep them ticking along. It's quite possible therefore to have multiple virtual machines running on a single box, without straining the modern CPU too much. With virtualisation built into the hardware, it's utterly transparent to the operating system that it's sharing hardware with other machines, and the single physical box simply looks like multiple machines connected to the network.

Virtual TV?

What the heck does this have to do with TV and entertainment PCs I hear you ask?

Well not a lot to be honest, except that this technology helped me to solve a problem which I faced recently to do with my TV streaming server.

It goes back to the software testing model I explained above. My server has MediaPortal's TV Server running on it 24-7. Unfortunately I was running an old version and I wanted to update it. The problem is that these things never go smoothly - how could I guarantee that taking the server down, upgrading the software, and getting it back up would work first time? How could I know how long this would take - would I have to leave the server down for some time? How would my wife watch Neighbours? All of these questions can be answered using virtualisation, and in particular VirtualBox.

VirtualBox provides a high level of hardware support. Not only are sound and video supported for example, but also USB2.0. So any of your USB devices can be passed through to the virtual machine for it to use as if they were plugged into the machine physically.

What this allowed me to do was to set up a fresh Windows XP virtual machine away from the server, get all the software installed, including the new TV server version, and then when I was ready, copy this virtual machine disc image onto the server. On the server, I redirected the TV cards connected to the server's USB ports into the virtual machine. This allowed me to test the new version using my real TV hardware but without affecting my working installation on the server. I could even connect to the virtual machine from my other PCs and watch TV streamed by the new version.

Once I'd proven that everything was working as expected, and that the new version of the software would work, I pulled down the physical server, made the upgrade and got it back up and running in around an hour. There's nothing like knowing that it's going to work before you start making changes like these!

In an ideal world, I would actually run the TV server permanently in a virtual machine, facilitating future upgrades. I could isolate my server's other functions into virtual machines too, providing a similar hot-pluggable infrastructure, however the USB support (or the power of my server) is not quite good enough to do this full time yet.

It's very likely that with a modern server and hardware virtualisation, this would absolutely be possible. One day, I might just set it up like that..

Home networking

When I first moved into my house, I used long (30m) patch cables to get Gigabit ethernet around the house. This was fine, and I managed to hide it quite well, however I was never quite happy with it.

I had a conversation down the pub with a friend who was lucky enough to move into a house which was pre-wired for network. His immediate question was "but why don't they do external ethernet cable?"

Good point.

I thought I'd investigate whether there was such a thing, and as it turns out, there is (although it's hard to buy in less than 100m reels). I bought some from this site (there are others) and decided to leap into the unknown of terminating network cabling myself.

A day's hole drilling, fiddling, and patching later, I have a panel in the loft which runs external cable down to each of the rooms that require ethernet connectivity. No messy wires on the inside, as the cables all run down the walls externally. A long hole is required to get the wires into the house, but then with a neat ethernet socket on the inside, it looks very tidy indeed.

On top of that it seems the throughput is far better than before, which is an added bonus. Yes, it took a bit of network know-how (follow the colour coding, don't think you know better) but it all worked perfectly. Wired might be a bit last century, but it still beats wireless for reliability and performance and homeplugs by cost.

Living with the eeeBox

Well it's been a very long time since I last posted - that must be something to do with a new family arrival I would imagine.. ;-)

I thought I'd add a few short posts about things I've been keeping an eye on, and comment on roughly a year's use of my Asus EeeBox B202s.

Firstly the only limitation that I've noticed of the B202 is its lack of full HD capability. 720p tends to playback ok, however anything greater than that is very jerky. Asus have addressed this with their new EeeBox arrivals (B204/B206). The additon of an HD compatible graphics card seems to have resolved that issue, whilst otherwise sticking with the same hardware.

Unfortunately Asus seem not to have been able to resist the temptation to increase the price of these new models. One of the key selling points in my opinion was the price of the original. The new models go for around £290 which although still not bad for an entertainment PC, for me is just a little too high.

Much like the Asus EeePC netbook however, other manufacturers are now catching up, most notably Acer with their Aspire Revo. This machine is similar in concept to the Asus, however it ships with an HD compatible card already included. There are two main specifications, one with Linux and a 20Gb SSD drive, and one with Vista (yes, the graphics hungry Vista) and a 160Gb HDD. The Linux machine was an amazing £149 when it was released, although reviewers were very critical about the SSD which performed poorly.

Subsequently, Acer have released the Linux version with a 160Gb drive (same spec as the Vista model) for £159 (at time of writing). Now that is a bargain as far as I can see. It's going to be hard to resist that to get some BluRay viewing on the main TV!

Tuesday, 21 October 2008

Wow-Eee

I've just received an Asus Eee-Box which I've had on pre-order for the last few weeks.

One word: Wow!

This thing is amazing - it's size has to be seen to be believed, especially the thickness, and I love that it comes with a Vesa mounting bracket so you can attach it to the back of your monitor for storage!

I ran it up last night, and it works exactly as expected. It comes with WinXP Home by default and I'm as yet undecided whether I should replace that with Ubuntu, however seeing as the Windows licence has already been paid, there's less of an argument.

It took only 15 minutes for me to get my TV software installed and immediately I was watching streamed TV from the server. I opened the TV Guide and could see all the programmes. All that client-server work seems to have paid off!

There were three areas I was concerned about before buying this device:

1) Did it have a powerful enough graphics card to display high resolution widescreen on an LCD TV?
2) Was the Atom processor enough to play back a minimum of 720p HD?
3) How quiet was it? Would it be noticeable in a lounge type environment?

All, I'm happy to report, work perfectly. The graphics chip is one pinched from a laptop as far as I can see, and it can produce 1280x1024 without a problem, probably more (although my monitors don't support higher as yet!)

The Atom has been a very pleasant surprise. It out-performs my old AMD 1.5Ghz PC with no issues, and plays back 720p smoothly. I've not tried it with 1080p yet, but I will do and will report back. No doubt the graphics card has something to do with this.

In terms of the noise level, it's extremely hard to hear it at all. Yes there is a fan, but unless you're within 2 feet with no other noise in the room, you can't hear it.

Overall from my first hours with this PC, I'm hugely impressed, especially what it can do for the price - just £200.

I'm going to get another one shortly for another room so that any TV/Music/Video/Web/Email can be tapped into anywhere in the house.

Finally I'm realising the vision I've had for so long now, an affordable networked home.

Tuesday, 26 August 2008

RTFM

I've been battling with MediaPortal TV Server over the last few weeks. I have been creating a new TV server machine, and wanted to get it as "clean" as possible by installing from scratch.

I initially thought it was a good idea to get Windows up to date as much as possible, then install applications. This usually results in a stable system. In addition, I took partition backups throughout the process so that if something went wrong, I could restore to a clean position.

PING

I realised that there's no need to buy a tool such as Norton Ghost any more as there are plenty of solutions available for free (which use Linux under the hood). One such example is PING which conveniently comes as a tiny bootable ISO cd image - allowing you to use it without affecting your filesystem.

It backs up a partition using PartImage, to either a network share or another disc on the host computer. When playing around with configuring a new PC, this tool makes it so much easier to experiment with drivers for example without getting your Windows installation in a mess.

TV Server Problem

All was going well until I reached the point of installing the Azurewave DVB-T cards and MediaPortal's TV Server.

No matter what I did, I could not get TV server to tune the cards. The error message was cryptic as it was in the depths of the BDA architecture. This was very frustrating because I already have a machine on which TV server works perfectly well with the Azurewave cards.

I set about restarting my install from various points (thankfully using PING) but it took me an age to find out what was causing the problem. I reinstalled many of the Windows updates, as generally I don't entirely trust that they won't have broken something, and also other applications which I'd installed in advance of the TV tuners.

Coincidentally enough, in the end, it was a classic case of PICNIC (Problem In Chair Not In Computer) because I'd tried to take a shortcut.. Recently MediaPortal have started to ship their application in a new deployment package. Seeing as I didn't want the full MP, just the TV Server, I'd extracted the deployment package and retrieved the TV Server installation. Had I not done that, it would probably have worked first time (sigh).

In my enthusiasm, I'd forgotten to run on a dependency before installing the TV Server. The deployment package automatically checks for this and tells you, but I wasn't running that.

Tail between my legs, I'm forced to admit (as a software developer by profession) that I fell for something that I tell users all the time - read the instructions on the box (or similar, but in fewer words!)

I guess we're all susceptable to making a mistake from time to time, and of course as a developer I always think I know better than anyone else when it comes to these funny interweb boxes!

I have made a note not to be so cocky again...